• Resolved fkoomek

    (@fkoomek)


    Hello.
    It seems like there is some problem when using Polylang with your plugin since the latest release. I use 2 languages and 2 appropriate slugs /en and /cs, and when someone visited my homepage liberlapidum.com, he always landed on the page according to his language – liberlapidum.com/cs or liberlapidum.com/en. Now, it doesn’t work like that. The first visitor visiting liberlapidum.com is redirected to his language version and every other visitor is redirected on the same page then, no matter what his language is. Also when I use language switcher and then revisit the site again, it isn’t stored. It worked fine before, I rollbacked to the previous version and it’s ok.
    Thanks

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello,

    Please disable the settings one by one (start with Minify and Browser Cache) and see if the issue persist.

    Thread Starter fkoomek

    (@fkoomek)

    Hello.
    I don’t use any of the mentioned settings.
    Only Page Cache. The issue appears immediately after I upgrade to 0.9.7.3.
    Once I downgrade it’s ok. The settings of the plugin remain unchanged after downgrade or upgrade.

    • This reply was modified 5 years, 11 months ago by fkoomek.
    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello,

    What is the Page Cache Method: you are using?
    Try to delete your cache folder in wp-content manually, and change your Page Cache Method: see if the issue persists.

    Thread Starter fkoomek

    (@fkoomek)

    Hello.
    I changed the caching method to enhanced (I was using basic) and the issue went gone.
    However, I need to use the basic method in order to cache query strings. Please, how can I solve this issue? Until 9.7.3.0 release all worked just fine.

    Try visit this link https://testing.liberlapidum.com/ and you’ll see that you’ll land on the Czech version of the page. That’s because I visited this URL before, was redirected to the Czech version (as it’s my browser language) and it somehow stayed cached.
    So every visitor visiting https://testing.liberlapidum.com/ will now land on the Czech version of the site no matter what his browser language is.
    Until the cache is cleared, of course.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello,

    Have you deleted the cache folder in your wp-content?

    Thread Starter fkoomek

    (@fkoomek)

    Yes, of course. Many times.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello,
    I just want to make sure that we understand each other. Have your purged all cache via plugin or have you deleted the cache folder manually via FTP/cPanel?

    Thread Starter fkoomek

    (@fkoomek)

    Hi.
    I deleted the cache folder manually via FTP.

    Thread Starter fkoomek

    (@fkoomek)

    I can provide you with FTP and admin access to my testing site to test the issue. There are only very few plugins installed and default theme.

    Thread Starter fkoomek

    (@fkoomek)

    Hello.
    I am still trying to solve the issue.
    I found out that from the latest version when I visit homepage liberlapidum.com and then I am redirected to approriate language version – liberlapidum.com/cs or liberlapidum/en, I can see this created in Cache folder (this is example when I was redirected to english version):

    ??í\<?php exit; ?>a:4:{i:404;b:0;s:7:”headers”;a:2:{s:11:”Status-Code”;i:302;s:8:”Location”;s:34:” https://test.liberlapidum.com/en/&#8221;;}s:4:”time”;i:1556902987;s:7:”content”;s:0:””;}

    Isn’t this the cause why everybody else is then redirected to the english version? It’s like the redirect is cached.

    When I use 0.9.7.2 version this file is not created.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello,

    There was a problem with page cache storing results of redirects, which was solved in 0.9.7.4 (released today). Please update to the latest version and see if the issue persists.

    Thread Starter fkoomek

    (@fkoomek)

    Hi.
    Thanks for the information.
    I tested it carefully and the issue unfortunately still persists.
    The first redirect is still cached and used for every other visitor then.
    After downgrade to 0.9.7.2. working fine again.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello,
    I spoke with the team and this behavior is expected. If you don’t need to cache result because the content is not static (depends on user language settings) – you have to switch it off.
    The Plugin version 0.9.7.2 contains a bug preventing cache to be handled well. And this was solved in the new version.
    Basically, If you want you can continue using 0.9.7.2 if it works for you. Please note that it has some bugs that were fixed in the other two releases.

    Thread Starter fkoomek

    (@fkoomek)

    Hello.
    Thanks for the clarification.
    What do you mean by “switch it off”?
    Do you mean the whole plugin?
    Actually, it seems I found some working solution. I don’t know how good it is but I added these lines to my mu-plugin file.

    function lg_disable_plugin($plugins){
    	 
    $actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
    if($actual_link == 'https://liberlapidum.com/'){
             $key = array_search( 'w3-total-cache/w3-total-cache.php' , $plugins );
             if ( false !== $key ) unset( $plugins[$key] );	
    }
    }
    add_filter( 'option_active_plugins', 'lg_disable_plugin' );	 
    	 
    Thread Starter fkoomek

    (@fkoomek)

    This way it seems the redirect isn’t cached.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘W3 + Polylang not working correctly from 0.9.7.3’ is closed to new replies.