J3 Issue ?
avatar joomlabeat
joomlabeat
3 Jun 2019

Steps to reproduce the issue

I am encountering an issue with Modern URL Routing and Switching Languages of the articles, which seems to happen when Cache is enabled. So before I describe the whole configuration, let me also ask where has the Caching Option of the Language Switcher module gone, as I can't find it anymore in the module's Advanced Tab, and it seems impossible to exclude the module from getting cached.

Here is my configuration:

  • 2 Languages.
  • 2 Categories: 1 for each Lang - Lang. Associated with each other.
  • 2 Category Blog Menu Items for those categories - Lang. Assoc. with each other
  • Associated Articles for the above 2 categories - No menu items for any of those articles.
  • One tag per article
  • Modern URL Routing (SEF URLs/Rewrites On of course - no 3rd party SEF extension).
  • Global Cache is On

Now: starting from the blog page - switching languages works. Then reaching to any of the categories articles, trying to switch languages I will go back to the category blog, OR if previously (and after having cleared the cache) I was on one the seconds languages articles of those 2 categories and used for example the navigation to go the next article, if on that next article I try to switch language, I will go to the previous associated article.

I have tried many different things (e.g. removing tags, disabling plugins, changing associations e.g. removing the menu items or categories associations) and finally the only thing that seems to work is to either disable the Modern Routing, or clear or disable the Global cache.
When clearing the cache I can have the first 1 article and its associated one work, but as soon as I visit a second article, language switcher stop working correctly.

This site has an adequate number of pages/menu items associated with each other. Until today, it was with Caching On and the Legacy Routing. The 2 categories, menu items, articles I mention here are new ones. All older articles are working with the Modern Routing, but they are all attached to menu items. At least that's what I have seen from my tests so far.

Expected result

Language Switcher will link correctly to the associated articles even without a menu item when cache is on.
Option to exclude Language Switcher from cache.

Actual result

Language Switcher seems to link to cached URLs.
Language Switcher doesn't provide option to exclude it from Cache.

System information (as much as possible)

Tested on both Joomla 3.9.5 and 3.9.6
PHP 7.2.18
5.5.5-10.2.24-MariaDB
Apache

avatar joomlabeat joomlabeat - open - 3 Jun 2019
avatar joomla-cms-bot joomla-cms-bot - change - 3 Jun 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 3 Jun 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Jun 2019
Labels Added: J3 Issue
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 4 Jun 2019
avatar ReLater
ReLater - comment - 4 Jun 2019

Related pr that removed the Cache setting from module: #23174
After clicking through many linked issues I gave up and don't know the real background of this removal for sure.

I think the reason is this find #23147
When I understand correctly the language switcher module is never cached.

avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Jun 2019
Status New Discussion
avatar joomlabeat
joomlabeat - comment - 4 Jun 2019

It seems that it gets cached though. Cache manager shows mod_languages cached files.

avatar SharkyKZ
SharkyKZ - comment - 4 Jun 2019

See if PR #24916 helps.

avatar infograf768
infograf768 - comment - 8 Jul 2019

In 3.9.9 RC, the cache Manager does not show here mod_languages.

avatar brianteeman
brianteeman - comment - 8 Jul 2019

if you look at the xml there is no setting to cache the mod_languages module

avatar infograf768
infograf768 - comment - 8 Jul 2019

Thank you. I know. That's because we did not want it to ever be cached.
I understand, looking at #24916 that there could be a problem when field name is owncache,which is not the case here.
The point is that I can't reproduce the issue as I do not see mod_languages as cached here.

avatar infograf768
infograf768 - comment - 8 Jul 2019

FYI, mod_login, mod_random_image, mod_syndicate have been corrected the same way.

avatar joomlabeat
joomlabeat - comment - 8 Jul 2019

My issue here was that the module had stored in the database the cache setting to 1 and for some unknown reason, its cache params couldn't be removed from the database even after saving the module and with the cache field non existent on its form.
I had to remove those params manually in order to set the module as non-cached.

Now generally this doesn't seem to be an issue, as normally when saving a module its params will be replaced/updated accordingly to what its form submits.

avatar infograf768
infograf768 - comment - 9 Jul 2019

Shall we consider this Issue as solved? If yes, please close.

avatar franz-wohlkoenig franz-wohlkoenig - change - 9 Jul 2019
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2019-07-09 06:56:26
Closed_By franz-wohlkoenig
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 9 Jul 2019

closed Issue, it can always reopened if its not solved.

avatar franz-wohlkoenig franz-wohlkoenig - close - 9 Jul 2019

Add a Comment

Login with GitHub to post a comment