Support » Plugin: Polylang » Issues with Polylang 1.2.x

  • Plugin Author Chouby

    (@chouby)


    Some users are having issues with Polylang 1.2.x as for example it breaks the Avada theme. Since the database has been modified between 1.1.6 and 1.2, it is not as easy as usual to revert to the previous version.

    For people who have not made a database backup before the upgrade and who need to revert to 1.1.6, a plugin is available on pastebin: http://pastebin.com/0TdQzQLv

    Please follow carefully the instructions and do not orget the database backup.

    You can ask questions on this procedure on this thread. Please open a separate thread for Polylang 1.2.x bug reports.

    http://wordpress.org/plugins/polylang/

Viewing 15 replies - 1 through 15 (of 37 total)
  • Plugin Author Chouby

    (@chouby)

    Known issue: After upgrading to 1.2.1, you may have to re-affect your menus to menus locations. I will try find a fix in the coming hours.

    Plugin Author Chouby

    (@chouby)

    The nav menus locations upgrade should now be fixed for all users upgrading to 1.2.1 from now.

    There will be no fix for users who have upgraded before. They still have to re-affect menus to menus locations manually.

    For users who do need to downgrade to 1.1.6, the nav menus locations are also lost during the downgrade process so they also have to re-affect nav menus locations manually.

    I downloaded the latest version and I’m having that problem, but only with one menu. I’ve tried creating a new menu, resetting the position and so on, but it still has the problem, it only shows the footer menu in spanish 🙁

    http://www.digaygane.com/newsite (” Aviso de Privacidad / Términos de Uso “)

    Could you help me plz?

    It was very strange that only the footer menu didn’t work. I opted for hardcode it using if (pll_current_language()==’en’) and so on… thx anyway.

    Plugin Author Chouby

    (@chouby)

    The problem I reported here with menus is for example this:
    In 1.1.6, you have two menus at two menus locations
    Primary English -> menu_en
    Primary Espanol -> menu_es

    After the upgrade, you got
    Primary English -> menu_en
    Primary Espanol -> nothing

    It was possible of course to manually re-affect menu_es to Primary Espanol in Appearance->menus after the upgrade. But I corrected Polylang so that this manual operation after upgrade is not necessary anymore.

    This for sure is for themes registering their nav menus and using wp_nav_menu to display them.

    If you are obliged to hardcode something in the theme, then that’s another issue.

    Chouby, we’ve notced an issue with Ajax calls. Before 1.2 we were adding lang=xx parameters, now it stopped working.

    Debug info:

    Notice: Undefined variable: model in C:\SERWER\htdocs\[…]\plugins\polylang\frontend\choose-lang.php on line 30

    Fatal error: Call to a member function get_language() on a non-object in C:\SERWER\htdocs\[…]\plugins\polylang\frontend\choose-lang.php on line 30

    @chouby

    This plugin is a complex one, no doubt about how complicated it is.

    Current version isn’t reading one <admin-texts> entry I have at one of wpml.xml files as beta version was, so strings table lack of that entry.

    Is it possible that current version is missing one fix you did to beta version code that improved wpml compatibility ?

    UPDATE:

    Maintain the plugin complexity and forget about my issue with that <admin-texts> entry.

    I had an error on that file, so it was my fault.

    Plugin Author Chouby

    (@chouby)

    @dfactory
    Changing this line 30 from:

    $this->set_language(empty($_REQUEST['lang']) ? $this->get_preferred_language() : $model->get_language($_REQUEST['lang']));

    to

    $this->set_language(empty($_REQUEST['lang']) ? $this->get_preferred_language() : $this->model->get_language($_REQUEST['lang']));

    should solve the fatal error issue.

    Could you tell me if everything with your ajax call is OK after this change.

    @miguelcortereal
    Yes this plugin is growing complex… The first version for my own usage was still quite simple. But covering more aspects of WordPress and adding new features made it complex.

    Is it possible that current version is missing one fix you did to beta version code that improved wpml compatibility ?

    hopefully not.

    @chouby,
    It fixes the fatal error, but started to throw a bunch of notices (first Ajax call is ok, second and every other throws notices):

    Notice: Trying to get property of non-object in C:\SERWER\htdocs\df\wp\wp-content\plugins\polylang\frontend\choose-lang.php on line 54
    
    Notice: Trying to get property of non-object in C:\SERWER\htdocs\df\wp\wp-content\plugins\polylang\frontend\choose-lang.php on line 55
    
    Notice: Trying to get property of non-object in C:\SERWER\htdocs\df\wp\wp-content\plugins\polylang\frontend\choose-lang.php on line 57
    
    Notice: Trying to get property of non-object in C:\SERWER\htdocs\df\wp\wp-content\plugins\polylang\frontend\choose-lang.php on line 58
    
    Notice: Trying to get property of non-object in C:\SERWER\htdocs\df\wp\wp-content\plugins\polylang\frontend\frontend-filters.php on line 79

    I indeed registered the nav menus and used wp_nav_menu to display them, and as a matter of fact it worked on 2 of 3 menus, except the one in the footer. I tried deactivating and reactivating the plugin, creating new wp menus, and nothing worked, so I gave up and hardcoded them (I know, I shouldn’t do that) but I don’t have more time to debug it. I’m letting people know here just in case they have problems with using more than 2 menu locations.

    Best regards and thx for your patience and time in developing such a useful plugin!

    Plugin Author Chouby

    (@chouby)

    @dfactory
    I don’t understand these notices as they mean that the line 30 did not pass a language object. All my tests (with or without ‘lang’ passed in the ajax request) work correctly. Could it be a wrong copy paste? I just uploaded a new development version (1.2.1.1) Could you test with it?
    http://downloads.wordpress.org/plugin/polylang.zip

    Or is it possible for me to test your plugin?

    It didn’t make the difference.

    Take a look at our News Manager (http://wordpress.org/plugins/news-manager/) or Events Maker (http://wordpress.org/plugins/events-maker/). Both have an Ajax Calenadar that worked before the recent update of Polylang.

    Plugin Author Chouby

    (@chouby)

    I will test them

    Plugin Author Chouby

    (@chouby)

    Thanks ! I believe I would not have found the problem without testing your plugins. The problem came from the fact that ICL_LANGAGE_CODE (that you are using to force the language in your ajax requests) was incorrectly defined when doing ajax on frontend. Since 1.2, Polylang defines this constant on admin side (based on the admin language filters state) as WPML does.

    I uploaded a new development version (1.2.1.4) to include the fix.
    http://downloads.wordpress.org/plugin/polylang.zip

Viewing 15 replies - 1 through 15 (of 37 total)
  • The topic ‘Issues with Polylang 1.2.x’ is closed to new replies.