? Pending

User tests: Successful: Unsuccessful:

avatar andrepereiradasilva
andrepereiradasilva
28 Jul 2016

Summary of Changes

If you use latest staging in multilanguage with language filter plugin with Remove URL Language Code set to Yes, you will notice in the frontpage that switching from default language to other language and back to default language will not work properly.

When #11206 was tested with success all worked fine because this issue was masked by the duplicated code removed in #11314.

So, this PR makes so that joomla does not cache any language filter 301 redirect to avoid any browser cache issues.

Testing Instructions

  1. Use latest staging in multilanguage (2 languages - en-GB and fr-FR), language filter plugin enabled and with Remove URL Language Code set to Yes.
  2. Clear all your browser cache
  3. Now go to your site homepage in default language
  4. Click on french flag - all ok
  5. Now click on english flag to go back to default language - all ok
  6. Click on french flag again - all ok
  7. Now click on english flag to go back to default language - Bug! It stays in french
  8. Apply patch
  9. Repeat steps from 2. to 7. All ok now
  10. Code review

Note: this happens because by the second /en/ to / (step 7) the redirect is already cached in the browser so the language cookie is not changed back to en-GB.

@infograf768 @ggppdk please test
@wilsonge please check also

avatar andrepereiradasilva andrepereiradasilva - open - 28 Jul 2016
avatar andrepereiradasilva andrepereiradasilva - change - 28 Jul 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 28 Jul 2016
Category Plugins Front End
avatar joomla-cms-bot joomla-cms-bot - change - 28 Jul 2016
Labels Added: ?
avatar andrepereiradasilva andrepereiradasilva - edited - 28 Jul 2016
avatar andrepereiradasilva andrepereiradasilva - change - 28 Jul 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 28 Jul 2016
avatar andrepereiradasilva andrepereiradasilva - change - 28 Jul 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 28 Jul 2016
avatar andrepereiradasilva andrepereiradasilva - change - 28 Jul 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 28 Jul 2016
avatar andrepereiradasilva andrepereiradasilva - change - 28 Jul 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 28 Jul 2016
avatar Bakual
Bakual - comment - 28 Jul 2016

Or use the uncached 302 redirects instead of a cached 301, but I'm repeating myself sigh.

avatar andrepereiradasilva
andrepereiradasilva - comment - 28 Jul 2016

lol. i wont start that discussion again. if you think it should be 302 (instead of 301) for default language also (all non default language are already 302), make a PR for that.

i made this so 3.6.1 is not released with this bug.

avatar infograf768 infograf768 - test_item - 28 Jul 2016 - Tested successfully
avatar infograf768
infograf768 - comment - 28 Jul 2016

I have tested this item successfully on d891e2f

After cleaning cache, make sure cache is enabled in the browser!

I confirm the issue and the solution works here.


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

avatar andrepereiradasilva
andrepereiradasilva - comment - 28 Jul 2016

After cleaning cache, make sure cache is enabled in the browser!

yes, if you cache disabled there is no issue at all

avatar infograf768 infograf768 - change - 28 Jul 2016
Priority Medium Critical
avatar infograf768
infograf768 - comment - 28 Jul 2016

Changing Priority as we do not want multilingial sites to be broken again...


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

avatar wilsonge
wilsonge - comment - 28 Jul 2016

I'm merging this so it's in the RC i'm about to ship

avatar wilsonge wilsonge - change - 28 Jul 2016
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-07-28 22:20:13
Closed_By wilsonge
avatar wilsonge wilsonge - close - 28 Jul 2016
avatar wilsonge wilsonge - merge - 28 Jul 2016
avatar chivitli
chivitli - comment - 16 Aug 2016

Sorry to comment so late, but it seems there is an issue with 301 redirect for the default language. When hreflang annotations are used to indicate different language version, there is usually also x-default hreflang for the homepage. But if you 301 redirect homepage then it seems search engine is detecting a broken chain of hreflangs. Check answer at https://productforums.google.com/forum/?utm_medium=email&utm_source=footer#!msg/webmasters/BuLYKloslbc/I9BzIiYBBAAJ, specifically paragraph about redirection, the rest is not relevant here

avatar zero-24
zero-24 - comment - 16 Aug 2016

Can you please open a new issue dor that? This one is merged. Thanks

Add a Comment

Login with GitHub to post a comment