Polylang 1.5.6 and Polylang 1.6 beta2

Polylang 1.5.6 is a stability release which fixes a few bugs. It should also fix a conflict with the Avada theme which leaded to an ugly fatal error.

Download Polylang 1.5.6

I also updated the beta version of Polylang 1.6 to include these fixes and a few others related to this development version only.

Download Polylang 1.6 beta2

15 thoughts on “Polylang 1.5.6 and Polylang 1.6 beta2

  1. RavanH

    Hi Frédéric, great work!

    Just did a quick test on a dev site and got some PHP warnings. Not a big deal but I thought I should mention it🙂

    With Twenty Fourteen and only the usual development plugins activated:
    1. Uninstalled older Polylang (clearing old settings)
    2. Installed beta2 via plugin uploader
    3. Configured 2 languages
    4. Without passing via the Languages > Settings tab (so I did not check the box to make everything the default langue) I went to Posts > All posts
    5. Selected all posts and selected Edit in the bulk editor, then chose the non-default (!) langue and hit Update.

    This produces a very long list of repeating PHP warnings:

    Warning: Illegal offset type in isset or empty in /var/www/default/wp-includes/cache.php on line 669

    Warning: array_key_exists(): The first argument should be either a string or an integer in /var/www/default/wp-includes/cache.php on line 669

    Warning: Illegal offset type in isset or empty in /var/www/default/wp-includes/cache.php on line 669

    Warning: array_key_exists(): The first argument should be either a string or an integer in /var/www/default/wp-includes/cache.php on line 669

    Warning: Illegal offset type in /var/www/default/wp-includes/cache.php on line 623


    Note: These warnings do not prevent the posts from being properly updated and they do not occur when choosing the default language.

    1. Frédéric Post author


      Thanks for the bug report. I believe that it is linked to the fact that the categories assigned to your posts had no language. I tried to fix it in beta3.

  2. RavanH

    Hi Frédéric, I just came across another issue. This is actually in the current stable version and I suppose in the beta too so it might be a good time to find some kind of solution.

    I’ll try to explain what is going on by starting with a description of the current setup on one of my sites:

    On a multi-site installation, running Domain Mapping (with the “automatic redirect to primary domain” option switched off) there is a site with two mapped domains configured and Polylang with two languages. So I have (for example) the network domain mynetwork.net with a site: mysite.mynetwork.net which has now two mapped domains mysite.com and mysite.fr

    Entering the WP admin on the primary domain mysite.com which corresponds with the default english language, I have set Polylang to “Language is determined by different domains” and entered the secondary mysite.fr domain for the secondary french language. This works great!

    But there are two problems/risks:

    1. This works great as long as the Domain Mapping redirect option remains switched off or else an infinite redirect will occur on the front end. And the option could be switched on by accident or by an unsuspecting site admin or even by a super admin that is not aware of site admins having configured Polylang in this way.

    2. Because the Domain Mapping redirect option is switched off, the dashboard can be accessed via the secondary domain mysite.fr/wp-admin/ and the original subdomain mysite.mynetwork.net/wp-admin/ too. And this creates a problem when saving options on the Settings > Languages > Settings tab. This time the default english language is matched to the non-default domain mysite.fr same as the french language and the default domain field cannot be changed. Before saving, the default language is still matched to the .com domain even though it does not appear to be in the settings. But after saving the settings both the default language and the secondary language are now indeed both set to the same domain.

    Possible solutions?

    I realize it will be difficult to make Polylang and Domain Mapping (there are two domain mapping plugins that work differently!) work together without these possible pitfalls but it might be possible to take the rough edges off and to prevent big blunders:

    1. Could there be devised a way to detect a redirect loop when it cycles through the domains a second time and then make Polylang fall back to “Language is determined by content”?

    2. Can the default language domain field be set to “enabled” and not be auto-filled with the domain that is (at that time) used to access the admin? The auto-fill maybe only upon first activation of the Language by Domain option when that field is empty…

    1. Frédéric Post author

      Hi Rolf,

      First, I am glad that Polylang and Domain mapping can work together (I would not have bet on this!). I will look at your suggestions. Dont’ expect something at initial release of v1.6 though.

    2. Frédéric Post author

      Hi Rolf!

      Sorry for the long delay… In 1.7beta2, I now allow to change the domain for the default language. I looked a bit at the domain mapping plugin. As you I concluded that the compatibility is not perfect and that you are forced to switch the domain mapping redirect option. So far I see no way to make it work except rewriting a part of the domain mapping plugin as everything is done even before Polylang is loaded.

      1. RavanH

        OK, so one step closer but still not perfect… The redirect loop is a tricky one. May I try to negociate some colaboration on this front between you and the two (Doncha’s on WordPress.org and one by WPMUDEV.org) domain mapping plugin devs? I suspect both use this ‘early’ redirection before other plugins are loaded so maybe the only way to prevent the conflict is for Polylang to detect the domain mapping setting from the DB and deactivate the “detect language from domain” option. Or maybe simply use is_multisite() to always disable this option on a network installation to be on the safe side?

    1. Frédéric Post author

      Hi Jon,

      I am perfectly aware of this situation. Currently I do not circumvent the WP limitation to have a unique slug. It’s on my long term plan to do so, but I am still waiting for WP core improvements, for example #20783. Waiting for this, you can manually change the slug to make it slightly less ugly.

  3. Georges BUSTOS

    Hello every body

    We are trying to use Polylang with AVADA theme but so far, it is impossible.
    Let me explain
    We first install all plugins (Avada 3.6.2) and then Polylang (1.5.6) plus other classical ones ( SEO, cookies, backup, …)
    I created a page (2 days of work with custom CSS, settings on Avada).
    As I was almost done, I decided to activate Polylang to prepare the English page (translated from the French page).
    I set different parameters to have my site in French and English.
    I Updated my page website and immediately saw that all settings and custom CSS from Avada was gone.

    I tried a lot of different ways to restore what I did and finally succeeded.
    But as soon as I activate Polylang, I lost immediately my Avada settings (there are all reseted) and custom CSS.

    Any ideas of what’s wrong?

    Thanks for your reply

    1. Frédéric Post author


      For any support request, please use the support forum (of Polylang and / or Avada). For your information, I am aware that Avada stores one set of options per language.

    2. RavanH

      Hi Georges, take a look at the Polylang settings. The avada theme might store these custom css and stuff as post type which means that Polylang will try to make it language specific… Normally you can switch this behavior off for this type of things.

      1. Georges Bustos

        Thanks for the reply.
        Any more detailed information?
        From where can I switch off these things?


Comments are closed.