wp-polylang-translate-rewrite-slugs icon indicating copy to clipboard operation
wp-polylang-translate-rewrite-slugs copied to clipboard

get_post_language was called incorrectly in ..... class-wp-hook.php

Open thevelop opened this issue 4 years ago • 2 comments

Hi,

Nice tool, it works, thank you!

I found a php warning in a var inside function:

Warning var: $polylang->model->get_post_language(), line 181 from polylang-translate-rewrite-slugs.php deprecated in Polylang v1.8.

If we change to PLL()->model->post->get_language($post->ID) warning dissapears.

If canonical tag exists, your tool prints correct slug, so it doesn't redirect old slugs to new slug, we need add an adittional htacess redirect.

Tested in:

Wordpress: 5.4.2 Polylang: 2.7.4 Php: 7.4.2

Thanks!

thevelop avatar Jul 02 '20 08:07 thevelop

@KLicheR @tanelkarp @idflood is this plugin still being maintained? This warning from @thevelop is now a show stopper... with the latest Polylang (version >=3.0), this now throws an error: Call to undefined method PLL_Model::get_post_language() and stops Wordpress from functioning correctly, and so this should be fixed.

gleysen avatar Mar 15 '21 21:03 gleysen

This plugin has not been updated in several years. I think this feature is included these days in Polylang pro

Cobrarosa avatar Aug 29 '21 09:08 Cobrarosa