User tests: Successful: Unsuccessful:
Pull Request for New Issue.
After #12671 when you have cache enabled an install a language the language cannot be used until you clean the cache.
This PR intends to solve that.
None.
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
right, first instinct was to solve the imediate problem and think later
anyway in this PR i do the same for the getContentLanguages (which, for now, is only used in associations edit), but those IMO we cannot cache to file (unless we clear the cache everytime we create/delete/change a content language).
so what do you propose, add a cache clean of com_languages
everytime a language is installed/removed?
if so, i'm not very confortable with caching mecanisms and JInstaller, could you help pointing the way?
At https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_installer/models/languages.php#L257 add a call to JFactory::getCache()->clean('com_languages');
to the end of the method.
Edits to content languages already clear that cache group, see https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_languages/models/language.php#L262
So the part that isn't covered is clearing cache after a regular extension install or update. For install you could do something in https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_installer/models/install.php#L64 but you'd need to figure out what kind of data is available to you to only clear that cache for language packages/extensions. Funny enough, the controller method for that task clears the mod_menu
cache always on success. The same applies to the update controller/model as well.
thanks a lot! will check that
i think (and hope) in the last comit i cover all installed languages cases.
content languages is another issue, because we need to clean the cache on every action ... even just changing the state of a content language in the list view. so, probably is better not to cache those...
ok @mbabker since the content languages is already been cached anyway i added it again.
See https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/language/helper.php#L134
please check if we can solve the installed languages cache the way i did it. thanks in advance.
Title |
|
Title |
|
Title |
|
Title |
|
This should work. I can't say that clearing this cache in the install adapters is a good technical solution, but I don't really have anything better for the moment so let's run with it so we don't lose the ability to cache this data.
I have tested this item
confirmed issue with cache
applied patch - no issue with cache
I have tested this item
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Milestone |
Added: |
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-12-06 22:13:00 |
Closed_By | ⇒ | rdeutz |
This seems somewhat backward to me. It seems to me this data should be saved to a cache group that gets cleared on extension install/update and if we aren't already doing so there should be "critical" cache groups that are cleared on extension install/update.