Publisher is EE6 compatible, but it does not support the Fluid field. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: New Phrases not working

Status Resolved
Add-on / Version Publisher 3.8.0
Severity
EE Version 6.3.5

Hop Studios

Oct 17, 2022

I’m performing an EE upgrade from 5 to 6, and the new phrases I need to add are not translating. Do I need to enable anything for the new phrases to work? Also, I get a weird error when visiting `?/cp/addons/settings/publisher/approvals`.
Please have a look at the screenshots.
—Gil

#1

BoldMinded (Brian)

Oct 18, 2022

Comment has been marked private.

#2

BoldMinded (Brian)

Oct 18, 2022

Have you tried it without Cartthrob installed? It looks like something is interfering with the phrase parsing process.

#3

Hop Studios

Oct 18, 2022

It’s kind of odd… I just tried to output another newly created phrase, which is being translated/loaded properly in the freeform template.

Could it be that I wrote direct SQL to insert the phrase group and phrase data? Is there other places in the database that I need to register the phrase?

#4

Hop Studios

Oct 18, 2022

Something even more weird has happened… so in the same phrase group that I created via SQL, I changed one of the phrases to have phrase name = AF_testing and i can then see it in the freeform (country selector):
https://staging2.lucistrust.org/es/about_us/signup
https://staging2.lucistrust.org/admin.php?/cp/addons/settings/publisher/manage/phrases/manage-phrase/769
BUT it only works when I use the suffix _testing. It doesn’t work when I change it to other things. The same thing is not happening for the other ones, though.

#5

BoldMinded (Brian)

Oct 18, 2022

If you’re inserting data directly with SQL then I’m not really sure if I can help because that is outside of the normal supported process and I have no idea what has been done.

#6

Hop Studios

Oct 18, 2022

I needed to create a list of country names and translations, so I inserted them directly into phrase_group, then took the group id and inserted them into phrases. Are you caching the phrases somewhere else?

I removed the strtolower from line 566 in mod.publisher.php around `$phraseName`, and everything is working. Any downside you see from this? Can that be made into a toggle? I could argue that if it’s possible to use/save upper case letters in the phrase name, the code should not modify what the user passes in (the supposed phrase name) with upper case characters.

I also noticed that the `ee()->config->_global_vars` doesn’t get refreshed when you resave the phrase name ?/cp/addons/settings/publisher/manage/phrases/manage-phrase/{id}, it only gets refreshed when you save in the translation page.

- Gil

#7

BoldMinded (Brian)

Oct 18, 2022

Yes, phrases are cached by EE.

Yeah I think you can remove the strtolower, that might have been an old mistake. I’ll update the next release with that change too.

I’ll make sure the cache is cleared when saving the phrase name, which should fix that global_vars issue.

Login to reply