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?
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.
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.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.