Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
thevelop opened this issue Jul 2, 2020 · 2 comments
Open

Comments

@thevelop
Copy link

thevelop commented Jul 2, 2020

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!

@gleysen
Copy link

gleysen commented Mar 15, 2021

@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.

@Cobrarosa
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants