After migration website on wordpress to another server and another domain.
I have website root in the same directory. I heard that there is some config in database of this plugin POLYLANG but have no idea where.
I have an error like:
Class ‘PLL_Links_’ not found in /wp-content/plugins/polylang/include/model.php on line 915
someone has an idea how to fix this problem ?
I had the same error, prior to the error was an “Undefined index” notice.
It was caused by an empty
$this->options['force_lang']
var.This var is loaded from the
wp_options
table, theoption_name
within this table ispolylang
. There should be a JSON encoded array ofpolylang
options.In my case the issue could be fixed by removing the domains from the JSON data, so it reads something like:
This question can be still actual for some people.
I’ve spent tons of hours on it. And the trick that helped me is to fall back to v.0.9.8 from here – https://wordpress.org/plugins/polylang/advanced/.
Then get v.1.9.3 and unpack it to plugin folder. Then you are good to go with v.2+
I got here because Polylang 2.3.1 was throwing a similar error after a database migration:
If you look at the code in the model.php file referenced in the error, you can see that the plugin tries to retrieve a class name using the ‘permalink_structure’ option set in the database. If the migration changes this option to something Polylang can’t handle, it triggers the error.
To go around the fatal error, you either have to:
or
wp_options
table.WordPress should run normally after this. I have not yet found out why it cannot handle certain permalink settings, but if I do, I’ll update this answer.
I did a global domain replacement in the file when moving the database from local to live . The problem in the end was that the serialized array in wp_option.option_name = “polylang” is broken. You must change strings length in the domain array:
on a local:
after replacing in file:
must be: