Thanks for the info. Does it work if you just replace
$polylang->model->get_post_language
with
PLL()->model->post->get_language
?
Hey Mikko,
I tested to switch “$polylang->model->get_post_language” to “PLL()->model->post->get_language” on line 27 in relevanssi/lib/common.php and the notice from the debugger disapered. Thanks!
Thanks, this’ll be fixed in the next version.
Hey, Mikko, having same issue. Is there a quick work around (besides changing /lib/common.php)?
This is already fixed in the current version, so the quick workaround would be to updating to latest version.
Hey, thanks for getting back. Still getting the error even on latest version of Relevanssi:
Notice: get_post_language was called incorrectly in /srv/www/site.dev/current/web/app/plugins/relevanssi/lib/common.php on line 26: the call to $polylang->model->get_post_language() has been deprecated in Polylang 1.8, use PLL()->model->post->get_language() instead. Error handler in /srv/www/site.dev/current/web/app/plugins/polylang/include/model.php on line 595
Notice: get_post_language was called incorrectly in /srv/www/site.dev/current/web/app/plugins/relevanssi/lib/common.php on line 26: the call to $polylang->model->get_post_language() has been deprecated in Polylang 1.8, use PLL()->model->post->get_language() instead. Error handler in /srv/www/site.dev/current/web/app/plugins/polylang/include/model.php on line 595
Warning: Cannot modify header information - headers already sent by (output started at /srv/www/site.dev/current/web/app/plugins/polylang/include/model.php:595) in /srv/www/site.dev/current/web/wp/wp-includes/pluggable.php on line 1171
You’re running Relevanssi 3.5.3? The line 26 of common.php in 3.5.3 is
if (PLL()->model->get_post_language($hit->ID)->slug == ICL_LANGUAGE_CODE) {
so I can’t see where the $polylang->model->get_post_language() is on that line…
Hm, I’m using composer to manage plugins, it ((https://wpackagist.org/search?q=relevanssi&type=any&search=) actually shows 3.5.4 as latest and 3.5.3 on WordPress plugins directory.
Line 26:
if (PLL()->model->get_post_language($hit->ID)->slug == ICL_LANGUAGE_CODE) {
but error still says the same. Any guesses why it is so?
No idea. For starters you could start a new thread for this, as this thread is already marked resolved.