grappler / polylang-slug

A unique post slug within the language in Polylang. This allows for a page to have same/identical slug in multiple languages.
268 stars 84 forks source link

Polylang Slug produces critical error since last update #52

Closed pierrehansen closed 2 years ago

pierrehansen commented 2 years ago

had to deactivate the plugin since Wordpress 5.8.3 + Polylang 3.1.3

LukaszJaro commented 2 years ago

What error are you getting? I'm using polylang Version 3.1.4 with no error.

pierrehansen commented 2 years ago

Hey Lukasz, this is the error I (always) get:

Fatal error: Uncaught ValueError: version_compare(): Argument #3 ($operator) must be a valid comparison operator in /homepages/u48097/testserver/brill/wp-content/plugins/polylang-slug-master/polylang-slug.php:31 Stack trace: #0 /homepages/u48097/testserver/brill/wp-content/plugins/polylang-slug-master/polylang-slug.php(31): version_compare('3.1.4', '1.7', '=<') #1 /homepages/u48097/testserver/brill/wp-admin/includes/plugin.php(2288): include_once('/homepages/u480...') #2 /homepages/u48097/testserver/brill/wp-admin/plugins.php(192): plugin_sandbox_scrape('polylang-slug-m...') #3 {main} thrown in /homepages/u48097/testserver/brill/wp-content/plugins/polylang-slug-master/polylang-slug.php on line 31

chesio commented 2 years ago

Hi @pierrehansen,

I think the problem is not related to Polylang or WordPress version, but to PHP version. I get the same error as you on PHP 8, but not on PHP 7.x.

I'll submit PR with a fix, but I'm not sure whether @grappler is going to merge it, the plugin is not maintained anymore as the same feature is now available in Polylang Pro.

pierrehansen commented 2 years ago

Thanks for getting back. That's likely! I switched to php-fpm 8 to speed up my pages.

"as the same feature is now available in Polylang Pro" Good to know. Thanks!