0

Using Transcribe with EE4.

I have the wierdest issue ever and I can't seem to figure it out.

I have installed Transcribe and created two languages - EN and KIN.

I use the following code:

{exp:transcribe:entries channel='articles' category="1" sort='asc' orderby='title'}
<a href="{url_title}">
<div class="articleSnippets">
{article_image}
<img class="article_image" src="{path}/{filename}.{extension}" />
{/article_image}
<h2>{title} - {transcribe:language_abbreviation}</h2>
<p>{excert}</p>
</div></a>
{/exp:transcribe:entries}

I use that under a template, as an example, my-template. This was an already existing template. So I visit www.domain.com/my-template and unfortunately, it gets all the articles in that channel (articles) and that category (1), and labels them all in that language, even the ones that aren't in the chosen language. For example, with EN selected, it gets all of them, including all the KIN language articles, and vice versa.

Now here is the teaser. If I create a brand new template, lets call it mytemplate, and visit www.domain.com/mytemplate, it works under that new template. So I delete the old template, create it again, still doesn't work (as my-template). I call the template, www.domain.com/bananasandapples, and it works under that template.

It's like every time I use the name of the template that already existed, it doesn't work. I've tried uninstalling transcribe, deleting the templates, installing transcribe, creating them again. No luck.

I've looked at the debugger, and the only thing I can see is this:

On my-template (doesn't work), a SQL query comes up:

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 mytemplate (works)

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

Another SQL query later, on my-template (doesn't work):

SELECT DISTINCT t.entry_id , exp_channels.channel_id , t.sticky , t.title FROM exp_channel_titles AS t
LEFT JOIN exp_channels ON t.channel_id = exp_channels.channel_id INNER JOIN exp_category_posts ON t.entry_id = exp_category_posts.entry_id
INNER JOIN exp_categories ON exp_category_posts.cat_id = exp_categories.cat_id WHERE t.entry_id != '' AND t.site_id IN ('1')  AND t.entry_date < 1599557123  AND (t.expiration_date = 0 OR t.expiration_date > 1599557123) AND t.channel_id IN (2) AND exp_categories.cat_id = '3' AND t.status = 'open' ORDER BY t.sticky desc, t.title asc, t.entry_id asc LIMIT 0, 100

On mytemplate (works):

SELECT DISTINCT t.entry_id , exp_channels.channel_id , t.sticky , t.title FROM exp_channel_titles AS t
LEFT JOIN exp_channels ON t.channel_id = exp_channels.channel_id INNER JOIN exp_category_posts ON t.entry_id = exp_category_posts.entry_id
INNER JOIN exp_categories ON exp_category_posts.cat_id = exp_categories.cat_id WHERE t.entry_id != '' AND t.site_id IN ('1')  AND t.entry_date < 1599557135  AND (t.expiration_date = 0 OR t.expiration_date > 1599557135) AND t.entry_id  IN ('25','28','30','31','33','34','35','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','67','69','70','82','83','84','85','87','88','89','90','91','93','94','95','96','97','98','99','100','101','102','103','104','106','107','161','162','170','171','347','684','686','689','695','699','705','707','727','788','799','846','861','883','884','893','921','952','965','966','967','968','969','971','972','973','974','975','976','977','978','979','981','982','985','992','1046','1121','1124','1129','1132','1134','1135','1147','1148','1166','1242','1358','1374','1375','1419','1425','1446','1454','1512','1525','1554','1581','1612','1629','1704','1711','1712','1789','1802','1803','1809','1847','1931','1954','1968','1991','1992','1993','1994','1995','1996','1997','1998','2000','2005','2006','2007','2009','2072','2074','2347','2410','2411','2413','2414','2785','2791') AND t.channel_id IN (2) AND exp_categories.cat_id = '3' AND t.status = 'open' ORDER BY t.sticky desc, t.title asc, t.entry_id asc LIMIT 0, 100

There are no other addons except Espresso, and I've tried it without that, but to no luck.

I'm pretty stumped if I'm honest. Any clues?

1

Working with the EE team, we fixed this.

Turns out, the

AND `tel`.`entry_id` IN (2) 

was the bit that was breaking it. Delving into the database, there was some very old entries that had the same URL as the template which didn't exist in the list of entries in the CMS. Removing those out of exp_channel_titles fixed the issue.

Massive thanks to the EE team for all their help on this.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.