Plugin Author
Tim W
(@timwhitlock)
To answer your question I would have to see the code that loads the text domain.
Thread Starter
p4ssc3
(@passce)
Okay, how can I show you that ?
Plugin Author
Tim W
(@timwhitlock)
A link to download whatever theme/plugin is causing the issue would be useful. Also instructions on how to render an offending string on the screen.
Thread Starter
p4ssc3
(@passce)
okay but don’t want to do it in public access here… Do you have an email?.
Plugin Author
Tim W
(@timwhitlock)
I only offer to debug other people’s code in public. I don’t provide help examining what’s wrong with closed source or commercial code.
Thread Starter
p4ssc3
(@passce)
Ok so I do it here and later I will edit the messagr to remove it.
All the files of the website (multisite) : https://jchuactif30.fr/wp-content/uploads/sites/15/Fichiers_2022-08-25_ID-EJZHEZ5U01.zip
Hre you can see the issue : https://cos-mairie-ales.com/
“No event found!” -> it’s supposed to be french
thanks
Plugin Author
Tim W
(@timwhitlock)
This is a 3G file. I’m not trawling through your whole website. The string presumably comes from a plugin. Just post that plugin please.
Also, a link to your website doesn’t constitute the instructions I asked for.
Thread Starter
p4ssc3
(@passce)
Well i don’t know what plugin is responsable of the bug. Please, I can’t modify my message anymore… “modify” link not there anymore. Can you do that ?
Thread Starter
p4ssc3
(@passce)
I just realized what you meant, sorry
This is the plugin : https://we.tl/t-amqIXeCS57
Plugin Author
Tim W
(@timwhitlock)
I’ve had a good look at this. The cause of the behaviour you describe is that under some circumstances your plugin doesn’t load the “modern-events-calendar-lite” text domain. It instead loads a text domain called “mec”.
This means that automatic (or “just in time”) domain loading is invoked when translations are displayed from the “modern-events-calendar-lite” domain.
In the case of automatic loading, WordPress checks for installed (system) translations before calling any filterable functions. This means Loco translate can’t override the file that gets loaded. I will add this as a caveat in my FAQ on custom file loading.
It’s worth mentioning also that your plugin seems to display translations BEFORE it’s attempted to load any, so relying on auto-loading is probably a good idea. For that reason I recommend you simply leave your system file in place. If you’re worried about adding unnecessary overhead loading two files, then ensure the system file is empty.
I’m marking this as resolved as I believe I’ve found the reason for the error and provided the only solution I can, which is to leave both files in place.
Thread Starter
p4ssc3
(@passce)
Okay thank you very much for your help