• I am getting this error after the last update and i have to deactivate polylang plugin.Any suggestions?

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Same here, pls fix this. WP 5.7.

    Warning: Cannot modify header information – headers already sent by (output started at /wp-content/plugins/polylang/include/translated-object.php:258) in /wp-admin/admin-header.php on line 9

    Warning: array_flip(): Can only flip STRING and INTEGER values! in /wp-content/plugins/polylang/include/translated-object.php on line 258

    I just reinstalled two previous versions and they didn’t fix the problem either. Same error messages. So it’s not the update itself.

    Thread Starter athanos

    (@athanos)

    Did you manage to find something after that?

    Plugin Author Chouby

    (@chouby)

    Hello,

    Your issue is due to a sequence of 2 events.

    1. You have used a database cleaning tool. Sometimes these tools delete database entries that must not be deleted.

    In the few cases we have observed, we found that they could delete the default category (which WordPress doesn’t allow in a normally working site).

    For Polylang, we observed that such tools partially delete the language itself. In version prior to 3.0, this can be observed by a language with no flag (and the impossibility to assign this language to taxonomy terms such as categories).

    We have reported the issue and helped to fix the cleaning tools we are aware of. But we probably don’t know all of them. So probably several tools are still doing wrong (Basically they ignore that we can create taxonomies for everything, not only posts or custom posts).

    So for a while, you had this broken language and of course, Polylang can’t work well in such case. You had also other error displayed but they occur less often, so you may have not noticed them.

    2. We made a small change in version 3.0 which unfortunately had several consequences for broken languages. Instead of appearing as incomplete, they now appear as empty (your languages list shows an empty line instead of an incomplete language in the version 2.9.2). And you see this warning.

    We will restore the previous behavior in the next version to avoid this warning.

    Hi @chouby,

    thanks for the reply. In the meantime we traded some emails with Sébastien and I explained my situation in detail. The point is that there’s no db cleaning tool installed. I sent over the list of plugins I’m using. But to make it clear to whoever it may concern, here it is:

    • Advanced Editor Tools (previously TinyMCE Advanced)
    • BBQ Firewall
    • Database for WPforms
    • Disable WP REST API
    • Easy Updates Manager
    • HTML Editor Syntax Highlighter
    • Hummingbird
    • Login LockDown
    • Raw HTML
    • Really Simple SSL
    • Remove jQuery Migrate
    • The SEO Framework
    • The SEO Framework – Extension Manager
    • WebP Converter for Media
    • WP Markdown Editor (Formerly Dark Mode)
    • WPForms Lite

    Also, Polylang has worked nine months just fine, along with all these plugins, and then went south without any tweaks in WP (other than core and plugin updates of course). So if this was a plugin conflict it should have presented itself a lot sooner.

    Today I removed Polylang completely, checked mysql for junk and then did a fresh install, with all the other plugins disabled. No joy. As soon as Polylang is activated the error messages show up in both admin and frontend, and no functionality is available.

    I did this on a second test site, with the same results. This one has never had Polylang installed previously. I don’t think it’s the expected behavior to pop error messages when you have no languages defined yet, and you just barely activated the plugin.

    I see that a new version 3.0.2 rolled out recently, after I reported this, but it doesn’t address the issue. Please look into it.

    @chouby,
    btw when do you expect to roll out the next update?

    Hi @chouby,

    I am experiencing the same issue and now my website is broken as a result ??

    The warning…

    Only flip STRING and INTEGER values! in /www/doc/www.domain.com/www/wp-
    content/plugins/polylang/include/translated-object.php on line 258 

    now occupies the first several dozen lines of my website (not the WP back end, but front end visible to customers) at the top and I cannot ged rid of them.

    The only thing that works is deactivating Polylang… but that makes the site useless as the other languages disappear.

    I′d therefore also humbly request an expedited update that will solve this issue.

    Thanks.

    I found a temporary way to make my site work while @chouby and Polylang work on the update/correction.

    This is what worked for me, I do not guarantee it will work for you and DO take a backup of your site before doing any of these changes as they can break it:

    1. Download and install WP Rollback. This free plugin will allow you to go back in time to when Polylang wasn′t causing this problem (according to above, the problem was associated with update to 3.0)

    2. Roll back the Polylang plugin to 2.9.2 (this can break your site, take a backup beforehand)

    3. Disable the auto-update setting of the Polylang plugin (so that it stays locked in version 2.9.2 until the promised update is done, only then update manually)

    4. In my installation, this worked. The “lost/disappeared” languages appeared and the error line about the string/integer problem on line 258 disappeared.

    5. I do still have an issue with the previously lost/disappeared languages not having a flag associated with them (which according to above was another part of the problem), I will investigate how to correct this further.

    Polylang is a great plugin, but it would be much appreciated if @chouby could do the promised update ASAP.

    I did basically the same but with fewer steps: I just restored a backup of db and file system from two months earlier. Now it’s back to normal but of course I can’t update anything as I have no idea what breaks it (apart from a db cleaner which I don’t have anyway).

    Also, in the meantime I went over to WPML and came back. Migration is basically hopeless. Maybe if you start fresh with them, it’s an alternative, but going over while keeping your existing content and site structure intact just won’t work.

    It would be awesome to have a patch released, but apparently Polylang team don’t consider this a critical issue. Regarding just this forum, they must have a massive backlog and the focus must be on paid support. So we can only hope they find the time to fix this in the near future.

    Thread Starter athanos

    (@athanos)

    Thanks @chouby. Indeed I have used a database cleaning tool and instead of that error maybe that’s why Polylang Flags were also dissappeared. I deleted the plugin and tried to install Polylang again. No luck.Possibly the cleaning tool has created a lot of issues. I decided to go with the cheapest WPML version to enable the multi language functionality quickly. Thanks everyone for your help.

    I have same issue. I haven’t used any database cleaning tools.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Warning: array_flip(): Can only flip STRING and INTEGER values’ is closed to new replies.