No Code Attached Yet J3 Issue
avatar Sandra97
Sandra97
28 May 2018

On multilingual websites, with the plugin System - Page Cache enable, when I navigate through a site in any language, and then click on the logo (or title of the site), I'm redirected to the homepage in the default language, instead of being redirected on the homepage in the active language.
It happens on all my multilingual websites (3.8.8), including joomla.org/3

Expected result

When clicking on the logo/title of the site, redirection to the homepage in the active language when the Plugin is enable

Actual result

When clicking on the logo/title of the site, redirection to the homepage in the default language instead of the active one when the Plugin is enable.
Issue solved by disabling the Plugin.

Additional comments

FYI, it occurs whether the router is set up on legacy or modern, with different templates and different PHP versions.

avatar Sandra97 Sandra97 - open - 28 May 2018
avatar joomla-cms-bot joomla-cms-bot - change - 28 May 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 28 May 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 28 May 2018
Status New Discussion
avatar franz-wohlkoenig franz-wohlkoenig - change - 28 May 2018
Category com_associations com_cache
avatar brianteeman
brianteeman - comment - 28 May 2018

Is this new behaviour. I would expect it to be always this way with the page cache plugin enabled.

avatar Sandra97
Sandra97 - comment - 28 May 2018

It was working correctly not that long ago on all my sites including the landing page. I'm unable to tell you right know when this issue appeared (after 3.8.7 or 3.8.8). I need to dig a bit for that.

avatar infograf768
infograf768 - comment - 28 May 2018

Which template are you using? The link in the logo/title may depend on the way it is coded.

avatar Sandra97
Sandra97 - comment - 28 May 2018

The official Joomla template (for the landing page), and templates from RocketTheme, YooTheme, JoomlArt.

avatar Sandra97
Sandra97 - comment - 28 May 2018

I did some tests from 3.8.2 to 3.8.8, with different templates. Seems it was already there in 3.8.2 but I didn't notice before. So it's maybe an (annoying) expected behaviour when the cache plugin is enabled. I just disabled it everywhere and now it's fine.

avatar mbabker
mbabker - comment - 28 May 2018

It's probably an issue of the order of plugins. If something matches what the page cache plugin has stored in the cache, it immediately serves that result and kills the Joomla application cycle. So in this case you probably need the page cache plugin ordered after the language plugins.

avatar infograf768
infograf768 - comment - 28 May 2018

I tested the plugin by setting browser caching off and I did not get the issue

avatar Sandra97
Sandra97 - comment - 28 May 2018

@infograf768 On or Off for Browser caching doesn't change anything. I have the issue as soon as the plugin is enable.
@mbabker It doesn't seem to change anything, issue is still there.
Anyway, it's not my day! 😛

avatar mikeveeckmans
mikeveeckmans - comment - 28 May 2018

i have the same issue as @Sandra97 described.

avatar brianteeman brianteeman - change - 28 May 2018
Labels Added: J3 Issue
avatar brianteeman brianteeman - labeled - 28 May 2018
avatar hacki65
hacki65 - comment - 29 May 2018

I have made some tests on one of my multilanguage sites and found a possible solution. The system plugin "System - Language Filter" has an option named "Cookie Lifetime". If this option is set to "Year" all seems to be fine.

BUT: if i switch to a language, stay at the homepage and then click on a logo i will be redirect to the default language. If i call up a subsite (like www.my-domain.de/en/contact) a cookie will be set and all is good.

Seems to be this is a Session Cookie problem. If the option is set to "Year" Joomla! generate a seperate cookie for each language. Otherwise only 1 cookie will be set.

BTW: the ordering or cache plugin settings changed nothing.

avatar Sandra97
Sandra97 - comment - 29 May 2018

I just did some tests with 'Year' instead of 'session', I'm still redirected to the default language instead of the active one as long as Plugin - Page cache is enabled.

avatar ggppdk
ggppdk - comment - 29 May 2018

I'm redirected to the homepage in the default language

It is an issue but a bit different

One is not redirected to the "default language" instead of "active"
instead one is redirected to the language to which the language cookie was last set ...

If you visit a page that has already been cached by the System - Cache plugin,

  • then the code that checks if the language cookie needs to be updated does not get executed

The language filter plugin will do this during onAfterInitialise

public function onAfterInitialise()
{
...
		// Attach parse rules for language SEF.
		$router->attachParseRule(array($this, 'parseRule'), JRouter::PROCESS_DURING);
	}
}

but if a cached page is returned via System - Cache plugin, then
$this->parseRule() which will call $this->setLanguageCookie($lang_code);

is never executed, thus language cookie is not updated

avatar brianteeman
brianteeman - comment - 9 Sep 2018

I am assuming that this is the same as the issue with #22099 so am closing it. If my assumption is wrong please post back and it can be reopened

avatar brianteeman brianteeman - change - 9 Sep 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-09-09 17:01:50
Closed_By brianteeman
avatar brianteeman brianteeman - close - 9 Sep 2018
avatar Sandra97
Sandra97 - comment - 10 Sep 2018

It's a different issue and it remains after applying the patch, so I still can't use the cache plugin on any multilingual sites.

avatar franz-wohlkoenig franz-wohlkoenig - change - 10 Sep 2018
Status Closed New
Closed_Date 2018-09-09 17:01:50
Closed_By brianteeman
avatar joomla-cms-bot joomla-cms-bot - change - 10 Sep 2018
Closed_Date 0000-00-00 00:00:00
avatar joomla-cms-bot joomla-cms-bot - reopen - 10 Sep 2018
avatar joomla-cms-bot
joomla-cms-bot - comment - 10 Sep 2018
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 10 Sep 2018

reopened as stated above.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20594.

avatar franz-wohlkoenig franz-wohlkoenig - change - 10 Sep 2018
Status New Discussion
avatar franx47
franx47 - comment - 19 Nov 2019

Using Joomla 3.9.13, the Language Switcher bug is still exist. I have the same problem on Bi-Lingual Site (English and non-english). Default language site is non-english. Everything is fine, menu item set to each of the language.

But, everytime I published the "System - Page Cache" plugin, it starts to get in problem.

Here is the Settings:

  • Use Browser Caching: No
  • Exclude Menu Items: (empty)

# ("System - Page Cache" plugin ENABLED)

  1. When the website open, it will redirect new visitor to the default language (non-english). Everything's fine.
  2. When the user change the default language (non english) to English, it will redirect the user to the English page. Everything's good.
  3. But when the user click the website logo or HOME menu, the site redirects back to the non-english page. Ofcourse this is incorrect. It still has to be in the English page.

I disabled the "System - Page Cache" plugin, the problem goes away.

Btw, "System - Page Cache" plugin has a good impact on Joomla page speed. Combined with JCH Optimize and System Cache (ON-Conservative).

Please, someone helps to patch this.

Thank you.

avatar jwaisner jwaisner - change - 18 Mar 2020
Status Discussion Confirmed
avatar brianteeman
brianteeman - comment - 26 Aug 2022

Thank you for raising this issue.

Joomla 3 is now in security only mode with no further bug fixes or new features.

I have verified that this is resolved in Joomla 4 and this will now been closed.

cc @zero-24

avatar alikon alikon - change - 26 Aug 2022
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2022-08-26 14:02:31
Closed_By alikon
Labels Added: No Code Attached Yet
Removed: ?
avatar alikon alikon - close - 26 Aug 2022

Add a Comment

Login with GitHub to post a comment