?
avatar maofree
maofree
15 Jul 2016

Steps to reproduce the issue

I've upgraded 2 sites to the last 3.6.0 and both have the same errors
the url for the logo link is done with this code
$this->baseurl
the site is this and it has 2 languages
http://www.anticotravaglio-monteriggioni.com
the italian homepage is
http://www.anticotravaglio-monteriggioni.com/osteria-gelateria/it/
instead the english is
http://www.anticotravaglio-monteriggioni.com/osteria-gelateria/en/
if I push on the flags languiages all is ok instead if I push on the logo no, it goes always on the default language.
if I push on the enaglish language and then I push on the logo I will get the italian language
so I think there is a cookie problem that doesn't remeber the selected language by the visitor.

on the 3.5.1 all was ok
with $this->baseurl the url is
http://www.anticotravaglio-monteriggioni.com/osteria-gelateria/
but after the url will be redirect to the right one following the current language

the same problem appears when I set only the domain
http://www.anticotravaglio-monteriggioni.com
the final url will be always
http://www.anticotravaglio-monteriggioni.com/osteria-gelateria/it/

thanks

avatar maofree maofree - open - 15 Jul 2016
avatar infograf768
infograf768 - comment - 15 Jul 2016

I tested your site and can't reproduce your issue.
When I am on the English (en-GB) Home page, the logo link gets to the same page.
When I am on the Italian (it-IT), I load the Italian home page OK when clicking on the logo.

avatar maofree
maofree - comment - 15 Jul 2016

Hi
I try again but if I set italian language all is ok (it is the default one)
instead if I set the english one and I go to another page and then I push on the logo I return to the italian language
I'm using firefox, on linux and widows I get the same result, on the past 3.5.1 it was, 15 minutes ago

avatar maofree
maofree - comment - 15 Jul 2016

ok with chrome it is ok
so the bug is on firefox

avatar infograf768
infograf768 - comment - 15 Jul 2016

I used Firefox for my tests

avatar maofree
maofree - comment - 15 Jul 2016

on firefox now I have cleaned the cache
I get the same problem but inverted now the default language seems in english
from italian language pushing on the logo I go to english language
it is so strange
in chrome is ok (cleaning the cache too)

avatar maofree
maofree - comment - 15 Jul 2016

with opera is ok

avatar brianteeman
brianteeman - comment - 15 Jul 2016

Tested on my android tablet and all worked as expected


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

avatar maofree
maofree - comment - 15 Jul 2016

http://www.saharizanzibar.net
here with firefox 47.0.1 I get the same error
only with these two sites upgraded 1 hour ago

instead this one is with 3.5.1 and it is ok with firefox
http://www.casavacanze-poderecappella.com

avatar infograf768
infograf768 - comment - 15 Jul 2016

Please use the forum for support http://forum.joomla.org as we can't reproduce your issues.
@brianteeman
I guess this can be closed.

avatar maofree
maofree - comment - 15 Jul 2016

Hi
in the forum I can't find any type of help.
I've asked to another developer, and he says the same thing.
with firefox on a pc, the language change, if EN is set and he push on the logo or set http://www.anticotravaglio-monteriggioni.com the language change to ITA
instead on this one all is
http://www.casavacanze-poderecappella.com/holiday-rental-siena/it/

he can reproduce this issue, so I think you can do it also.
The settings on my firefox are the same of yesterday the only thing changed if the Joomla's version

I've tested from another pc usign teamviewer, I get the same error, so I reproduce it from 3 different pc, from different OS and different LAN

please please please
can you ask to another guys to test?
do you know if something is changed about the language code? like rewrite url?

avatar maofree
maofree - comment - 15 Jul 2016

probably your defaul language is EN, so from IT it should go to EN pushing on the logo
howvere you should reproduce this error from all site with multilang

trust me it is a bug

please please please ;(

avatar maofree
maofree - comment - 15 Jul 2016

Hi
Asked to another guy to check this issue from his pc
he says the same thing, with firefox the language change to the default one when he presses on the logo

they are all from Italy

avatar andrepereiradasilva
andrepereiradasilva - comment - 15 Jul 2016

could be redirect cache related to this? #8894

avatar ggppdk
ggppdk - comment - 15 Jul 2016

@andrepereiradasilva

it is exactly that !

  • i have tested and confirmed it
avatar andrepereiradasilva
andrepereiradasilva - comment - 15 Jul 2016
avatar ggppdk
ggppdk - comment - 15 Jul 2016

See picture, indeed the browser is instructed to cache the redirect

redirect

@maofree

It was decided that visitors and search engines should always be redirected to the same language URL when the plain home page is requested

  • at 1st visit of a your home page url, it has no language code in it,
  • server (joomla) decides a language for the visitor according to configuration and browser settings
  • a redirection happens to the home page URL with language code, the browser is instructed to always request the language-based URL, instead of (in-place of) the bare home page URL

thus the language cookie is not used

The above is an intended behaviour change , that was considered worthable because of SEO ?
As andrepereiradasilva said, see #8894 (comment)

The current language cookie will be used if you append to yout home page URL:
?aaa=45

  • the above will bypass browser cache ...

Switch language and add a larger number to the above home page URL
and press enter,
you will see that the current language is respected

avatar maofree
maofree - comment - 15 Jul 2016

Hi
thanks for your info
so this problem came out from the 3.5.2, in fact the other sites are on joomla 3.5.1
The changes made on joomla give problems with firefox's cache

avatar infograf768
infograf768 - comment - 16 Jul 2016

as there are as many advices as users on this, we could add a prameter in the plugin to let choose between a 303 and a 301, default to 301.


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

avatar maofree
maofree - comment - 16 Jul 2016

hi
I've a question:
looking that post
with 303 redirect google will store both URLs in index
domain-name.com/contact -> domain-name.com/en/contact
with 301 redirect only the last one

so the better choice is 301
and you said
301 is correct for multilang. This was changed in 3.4.
so why in the 3.6.0 with firefox there are problems and until to 3.5.1 all was ok?
is it possible to alert firefox to change its cache behavior? the other browsers work well

thanks
bye

avatar maofree maofree - change - 16 Jul 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-07-16 07:47:01
Closed_By maofree
avatar maofree maofree - close - 16 Jul 2016
avatar maofree maofree - close - 16 Jul 2016
avatar maofree maofree - close - 16 Jul 2016
avatar andrepereiradasilva
andrepereiradasilva - comment - 16 Jul 2016

IMHO we could mantain the 301 redirect, but we could also use HTTP headers to not allow browsers to cache it.
This way we force browsers to always ask the server the location of the 301 redirect.

example: http://stackoverflow.com/questions/12192590/how-to-do-a-non-cached-301-redirect/19003320#19003320

avatar chrisdavenport
chrisdavenport - comment - 16 Jul 2016

301 is a permanent redirect and caches will retain it. You can provide HTTP headers that tell caches how long they should retain it, but telling a cache not to retain it at all is probably a contradiction since it's supposed to be permanent.

303 is a redirect to a different resource, which I don't think is appropriate here.

307 is probably the best choice since it is a temporary redirect and will likely not be cached by default. However, sending HTTP header directives would allow you to tell caches just how long they should retain it before considering it stale and it would be perfectly reasonable to tell caches not to retain it at all.

https://tools.ietf.org/html/rfc7231#section-6.4.2

avatar andrepereiradasilva
andrepereiradasilva - comment - 16 Jul 2016

"307 Temporary Redirect" is basicly the same thing as "302 Found".
See https://tools.ietf.org/html/rfc7238#section-1

avatar ggppdk
ggppdk - comment - 16 Jul 2016

I now that this is closed, but maybe rename title of it to:

J3.6.0, currently active language (language switch) ignored, when revisiting home page URL without language code

avatar maofree maofree - change - 16 Jul 2016
Title
Upgrade problem on 3.6.0 on the language switch
J3.6.0, currently active language (language switch) ignored, when revisiting home page URL without language code
avatar maofree maofree - change - 16 Jul 2016
Title
Upgrade problem on 3.6.0 on the language switch
J3.6.0, currently active language (language switch) ignored, when revisiting home page URL without language code
avatar maofree
maofree - comment - 16 Jul 2016

renamed
I accidentally closed it

avatar chrisdavenport
chrisdavenport - comment - 16 Jul 2016

@andrepereiradasilva Indeed. Depends whether we need to change a POST to a GET. Either way, I don't think 301, 303 or 308 are appropriate.

avatar andrepereiradasilva
andrepereiradasilva - comment - 16 Jul 2016

so we are left with 302, which, that i know of, does not cache.

avatar andrepereiradasilva
andrepereiradasilva - comment - 16 Jul 2016

please test #11161

avatar maofree
maofree - comment - 16 Jul 2016

Hi andrepereiradasilva
I've tested that changes replacing languagefilter.php
it seems ok but it generates a new bug, the language flags disappear with the horizontal menu (this happens pushing some times on the menu voices and switching the current language)
(now it is present the previous file)

111

bye

avatar maofree maofree - change - 16 Jul 2016
Status Closed New
Closed_Date 2016-07-16 07:47:02
Closed_By maofree
avatar maofree maofree - reopen - 16 Jul 2016
avatar maofree maofree - reopen - 16 Jul 2016
avatar ggppdk
ggppdk - comment - 16 Jul 2016

Flags disappear is probably not related to the issue or the fix of it !!
it is because of you template / extensions / configuration that you have in you in your website

avatar maofree
maofree - comment - 16 Jul 2016

this new issue happens when I use the new file, with the default one it is ok

avatar maofree
maofree - comment - 16 Jul 2016

Give me a moment to replace the last one to reproduce this error by yourself

avatar maofree
maofree - comment - 16 Jul 2016

go to the site and look at it
test it only for 5 minutes, then I return to the previous one

avatar maofree
maofree - comment - 16 Jul 2016

All modules are disappeared from the site

avatar dgt41
dgt41 - comment - 16 Jul 2016

@maofree is sh404sef installed in you site?

avatar maofree
maofree - comment - 16 Jul 2016

no

avatar dgt41
dgt41 - comment - 16 Jul 2016

and all langs are properly configured? content, menus etc?

avatar maofree
maofree - comment - 16 Jul 2016

yes
if you want i can give you the access to the admin

avatar maofree
maofree - comment - 16 Jul 2016

without the new rows all modules are visible

avatar maofree
maofree - comment - 16 Jul 2016
// Don't cache the redirect in browser.
$this->app->setHeader('Expires', 'Wed, 17 Aug 2005 00:00:00 GMT', true);
$this->app->setHeader('Last-Modified', gmdate('D, d M Y H:i:s') . ' GMT', true);
$this->app->setHeader('Cache-Control', 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0', false);
$this->app->setHeader('Pragma', 'no-cache');
$this->app->sendHeaders();
avatar ggppdk
ggppdk - comment - 16 Jul 2016

@maofree

go to the site and look at it

i didn't say that it does not happen
i just say that this is not happening because of patch

I assume that you did you disable any caching , including the system cache plugin before testing

avatar maofree
maofree - comment - 16 Jul 2016

the joomla's cache is disabled and now also jch optimize
I try to remove those new rows from that file

avatar maofree
maofree - comment - 16 Jul 2016

ok tested
the new issue is present because from that file is removed these lines
with the follow code the modules are visible

            $this->app->setLanguageFilter(true);

            // Detect browser feature.
            $this->app->setDetectBrowser($this->params->get('detect_browser', '1') == '1');
avatar andrepereiradasilva
andrepereiradasilva - comment - 17 Jul 2016

did you before clean all browser cache and cookies?
Try to use new private window, for instance,

avatar maofree
maofree - comment - 17 Jul 2016

yes cleaning the browser's cache it seems to work well

avatar ggppdk
ggppdk - comment - 17 Jul 2016

In order to test the patch you need:

  • your site cache OFF
  • clean browser cache
  • your site should not have a transparent proxy in front of it
avatar maofree
maofree - comment - 17 Jul 2016

now it works, that code fix this problem

can you add this lines to this file at line 78?

            $this->app->setLanguageFilter(true);

            // Detect browser feature.
            $this->app->setDetectBrowser($this->params->get('detect_browser', '1') == '1');

https://github.com/andrepereiradasilva/joomla-cms/blob/963c58ccd4184232d3e88f0897666a60059341a3/plugins/system/languagefilter/languagefilter.php

because from here now they are not present

avatar mbabker
mbabker - comment - 17 Jul 2016

You need to apply the changes from #10344 in addition to whatever you're testing if you're doing anything with the languagefilter plugin.

avatar maofree
maofree - comment - 17 Jul 2016

ok understood

avatar ggppdk
ggppdk - comment - 17 Jul 2016

@maofree
so the new issue you reported was because you applied 1 and half patches
)))

avatar infograf768 infograf768 - change - 17 Jul 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-07-17 06:37:27
Closed_By infograf768
avatar joomla-cms-bot joomla-cms-bot - close - 17 Jul 2016
avatar joomla-cms-bot joomla-cms-bot - close - 17 Jul 2016
avatar brianteeman brianteeman - close - 17 Jul 2016
avatar infograf768
infograf768 - comment - 17 Jul 2016
avatar infograf768
infograf768 - comment - 17 Jul 2016
avatar brianteeman brianteeman - change - 21 Jul 2016
Labels Added: ?
avatar maofree
maofree - comment - 28 Jul 2016

Hi
Today I got a google's notification about hreflang tag of that site
from webmaster tool I see 6 hreflang tags but in the site there are only 3 hreflang tags (in the source code).
It reports 3 hreflang tags have errors
Is it due from this fix or is it due from another issue?

1111

http://www.anticotravaglio-monteriggioni.com

thanks
bye

Add a Comment

Login with GitHub to post a comment