-
Notifications
You must be signed in to change notification settings - Fork 824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flush is not flushing languages files #4146
Comments
Hi @lekoala, Are you setting up a custom cache, either specifically for i18n or as a “default”? I just tested on 3.1.12 with the default cache setup (file) and it seems to be clearing the cache as expected |
Well, it's still happening there. Obvious ways to make it work are:
However, sometimes it does work. I'm wondering if this could be due to the fact that I'm overriding some translations in mysite/lang (for instance, I have in /module/lang an entity that will be partially overrided in mysite) and that for some reason, it doesn't refresh the combined array properly. Not really sure what's happening there. |
Ok ! Now I know what's precisely happening. Working scenario: Not working scenario: If anyone knows a way to simple override current behaviour to use CLEANING_MODE_ALL instead of the one with tags, I would be very happy (SS_Cache factory is not using injector so I don't see any obvious way to do this). |
@kinglozzer This is coming from your commit in 570f261 and the associated pull request in #3558. Can you provide some insight here? Haven't had the time to give it much thought. Just some observations:
|
@chillu The original issues we had were around caches overzealously clearing things: when you use a named Tags are automatically enabled if the cache that’s passed to I’ll have a play around with the steps described above and see if I can recreate this and track it down. @lekoala If this is causing you problems you can’t work around, in the mean-time you could do something like this in if(isset($_GET['flush'])) {
i18n::get_cache()->clean(Zend_Cache::CLEANING_MODE_ALL);
} |
Hi @kinglozzer ! I've tested again, it's a very strange issue. As long as I stay on the same page, I can flush and everything refresh correctly. Tags are indeed enabled for file based cache. |
@lekoala had a big issue with my lang files today. For me it was unescaped umlauts in the lang file (though inside quotes). A line like:
broke the whole lang for that module. changing ö to ö helped immediatly. Did you have similar files with unescaped umlauts? |
Although I have some translations in german, I'm mostly writing in french so maybe there is something with accentuated characters, I don't know for sure, it's hard to diagnose. I'm using kinglozzer solution for now and everything works fine, it's not like you change translation everyday anyway and flushing a few more files is no big deal. |
We've replaced the Zend_Translate backend with symfony/translate in 4.x, and I've confirmed this no longer happens for me: #6221. Modifying a translation string and reloading the CMS with |
Hello,
I've ran into a strange issue.
Usually, when I use ?flush=1 it flushes my translation. But I'm running a project where this does not happen.
I've tracked the issue down the issue to theses line in the i18n class:
Basically, it seems that when using tags, the cache is not flushed. If I replace with CLEANING_MODE_ALL, it all works fine.
So I'm not sure if it's because the "getTags" method doesn't return the proper tags, or if the clean by tag mode is not working as it should.
Templates and everything else are working just fine, it seems to happen only for languages files.
any thoughts?
The text was updated successfully, but these errors were encountered: