grappler/polylang-slug

Polylang-slug sometime loaded after polylang

Closed this issue · 4 comments

On some recent website an update of wordpress broke the module. The error message from polylang_slug_admin_notices was shown despite having both wordpress and polylang updated.

It turns out polylang was only loaded after polylang-slug, so the POLYLANG_VERSION constant was not declared yet the whole plugin was not working.

To fix it I manually changed the order of plugins in the table wp_option. There is a active_plugins option_name which list all enabled plugins and are loaded in this order.

The best solution would be to do this version check in the plugins_loaded hook.

Eventually since not only the error message was shown but the whole plugin didn't work maybe we would need to rely on this "hack" https://snippets.khromov.se/modify-wordpress-plugin-load-order/

That should not happen as Polylang should be the first plugin loaded. Adding some compatibility with WP 4.7 makes me introduce this bug with polylang/polylang@3754c70
I will fix that in the next version.

@Chouby I have not had time to test it. This can be fixed on your end?

Sure. It will be fixed in the next version. I reverted the faulty commit and found another fix for the compatibility with WP 4.7.

@idflood Can you confirm the issue is fixed in Polylang 2.0.12?