We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Transcribe or EE issue - all articles from both languages being returned, rather than just the language that is supposed to

Development and Programming

TN_GSO's avatar
TN_GSO
11 posts
4 years ago
TN_GSO's avatar TN_GSO

Hi there!

I’m posting here as well, just in case this is an EE issue rather than a Transcribe issue.

I’ve contacted the Transcribe devs directly who aren’t too sure what could be the issue, but I’ve dug a little further myself and posted some findings on Stack Exchange - https://expressionengine.stackexchange.com/questions/42008/eeharbor-transcribe-gets-all-posts-of-all-languages-rather-than-just-the-chos

Long story short, I’m running a transcribe entries loop in an existing template (a template that existed before installing Transcribe) and it appears to be getting all the articles from both languages, rather than just the selected language. If I use a new template and run the same loop, it works.

The SQL query that runs on the old template appears to be different to the one on the new template:

On the old template: SELECT tel.language_id, tel.entry_id FROM (exp_transcribe_entries_languages tel) JOIN exp_channel_titles t ON tel.entry_id = t.entry_id WHERE tel.language_id IN (1) AND t.channel_id IN (2) AND tel.entry_id IN (2) LIMIT 100000

On the new template: SELECT tel.language_id, tel.entry_id FROM (exp_transcribe_entries_languages tel) JOIN exp_channel_titles t ON tel.entry_id = t.entry_id WHERE tel.language_id IN (1) AND t.channel_id IN (2) LIMIT 100000

note the AND ‘tel’.’entry_id’ IN (2) line. That to me appears to be the cuprit which is getting all the entries.

Any clues as to where to look to rectify this?

       
Robin Sowell's avatar
Robin Sowell
13,158 posts
4 years ago
Robin Sowell's avatar Robin Sowell

Just to circle back for anyone reading in the future, ‘tel’.’entry_id’ IN (2) was indeed the clue. That should only have been there if it was finding a url_title with the same name as the last segment. And it turned out there were some stray records in exp_channel_titles that didn’t show in publish but that were indeed jamming things up.

👆 1
       
TN_GSO's avatar
TN_GSO
11 posts
4 years ago
TN_GSO's avatar TN_GSO

Thanks for all your help Robin.

As Robin says, all else fails, run up the debugger and look for the slightest clue. In this case, again as Robin says, there were some stray entries in the database that existed before we took it on, and it only came to light when installing Transcribe. Removed those entries from exp_channel_titles and fixed.

Big kudos for the EE team here.

👍 1
       
Robin Sowell's avatar
Robin Sowell
13,158 posts
4 years ago
Robin Sowell's avatar Robin Sowell

It was indeed a weird one!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.