Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: America/Los_Angeles (GMT-08:00)

This topic contains 10 replies, has 2 voices.

Last updated by Bobby 2 months ago.

Assisted by: Bobby.

Author Posts
November 30, 2023 at 7:01 pm #14966727

apptioM

Following an overnight activity spike, our website was no longer accessible and calls made by WPML were identified as the cause of the outage. Disabling WPML by renaming the plugin folder restored the site (without WPML functionality) and we are not able to reactivate WPML. The debug info below comes from a sandbox site that is reasonably, but not exactly current with our live site.

The error we receive is:

Warning: Illegal string offset 'active_languages' in /code/wp-content/plugins/sitepress-multilingual-cms/inc/functions-load.php on line 231 Notice: Array to string conversion in /code/wp-content/plugins/sitepress-multilingual-cms/inc/functions-load.php on line 231 Warning: Illegal string offset 'active_languages' in /code/wp-content/plugins/sitepress-multilingual-cms/inc/functions.php on line 168 Notice: Array to string conversion in /code/wp-content/plugins/sitepress-multilingual-cms/inc/functions.php on line 168 Warning: Illegal string offset 'icl_capabilities_verified' in /code/wp-content/plugins/sitepress-multilingual-cms/inc/setup/sitepress-schema.php on line 471 Warning: Illegal string offset 'interview_translators' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'existing_content_language_verified' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'language_negotiation_type' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'icl_lso_link_empty' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'sync_page_ordering' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'sync_page_parent' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'sync_page_template' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'sync_ping_status' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'sync_comment_status' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'sync_sticky_flag' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'sync_password' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'sync_private_flag' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'sync_post_format' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'sync_delete' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'sync_delete_tax' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'sync_post_taxonomies' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'sync_post_date' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'sync_taxonomy_parents' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'translation_pickup_method' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'notify_complete' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'translated_document_status' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'translated_document_status_sync' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'remote_management' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'auto_adjust_ids' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'alert_delay' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'promote_wpml' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'automatic_redirect' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'remember_language' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'icl_lang_sel_copy_parameters' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Cannot assign an empty string to a string offset in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'translated_document_page_url' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'sync_comments_on_duplicates' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 106 Warning: Illegal string offset 'seo' in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 99 Fatal error: Uncaught Error: Cannot use string offset as an array in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php:99 Stack trace: #0 /code/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php(956): WPML_Verify_SitePress_Settings->verify('04ac53e72_updat...') #1 /code/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php(116): SitePress->verify_settings() #2 /code/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/auryn/lib/Injector.php(444): SitePress->__construct() #3 /code/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/auryn/lib/Injector.php(417): WPML\Auryn\Injector->instantiateWithoutCtorParams('\\SitePress') #4 /code/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/auryn/lib/Injector.php(373): WPML\Auryn\Injector->provisionInstance('\\SitePress', 'sitepress', Array) #5 /code/wp-content/plugins/sitepress-multilingual-cms/classes/container/class-wpml-container.php(98): WPML\Auryn\Injector->make('\\SitePr in /code/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-verify-sitepress-settings.php on line 99
November 30, 2023 at 9:44 pm #14967813

apptioM

Following up with more information. Our icl_sitepress_settings entry in the wp_options table was corrupt. Somehow it was changed to "########_updated_at". Restoring that value to a known good value solved the urgent problem, but still unresolved was how it got corrupted in the first place and the fact the WPML was not able to notice that the value was bad and handle the error. We also observed the value being reset to a bad value by reactivating WPML before clearing the Object and site cache. A bad value should not have been re-written to the database from the Object cache (autoload data) upon plugin re-activation.

December 1, 2023 at 12:15 am #14968093

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Hi there,

Thank you for updating us and glad to hear you were able to resolve this issue.

If possible, please install the latest version of WPML found here https://wpml.org/downloads/

There are no known issues that would cause this behavior, and at the moment it is not something I have been able to reproduce in a sandbox.

Please let us know your results after installing the latest version of WPML.Hi there,

Thank you for updating us and glad to hear you were able to resolve this issue.

If possible, please install the latest version of WPML found here https://wpml.org/downloads/

There are no known issues that would cause this behavior, and at the moment it is not something I have been able to reproduce in a sandbox.

Please let us know your results after installing the latest version of WPML.

December 1, 2023 at 6:14 am #14968827

apptioM

In a sandbox, you should be able to change the value of the settings field in the database to a simple string and see the problem. I'm not sure how that happened in our case but it did and WPML did not detect or recover from that error. Monday, I can setup a sandbox of our site to replicate the error state.

December 1, 2023 at 10:18 pm #14976345

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Hi there,

I have created a sandbox, however, if you are saying to remove the icl_sitepress_settings value and replace it for example with just "hello", yes WPML would lose it's settings and not work as expected.

hidden link

This can happen during a migration or if there was any work that involved altering the database and it is a rare behavior and not something our team has seen to happen due to an upgrade for example or normal function of our plugin

December 4, 2023 at 6:39 pm #14990711

apptioM

The original error surfaced overnight when we were not doing anything in terms of upgrading, migrating, or installing. We don't know what the original cause of the data invalidation was, nor do we expect that to be fixed. I understand that having invalid data is a rare occurrence, but it did happen to us and I have seen other tickets where it has happened to others. I am requesting more robust detection and recovery when this does happen. Our site was inaccessible for several hours and we had to use FTP to disable WPML once we determined that was the likely source of the site crash. We had no access to the site front end or back end through WordPress. If this had happened to a someone with less technical experience and tool access, the site might still be down. What we would like to see happen is:

1. Have an error check when retrieving the WPML settings value to ensure that is at least an array of key->value pairs, if nothing else

2. Gracefully recover from such an error state, rather than having a fatal error that takes both the site front end and back end down.

3. When it is determined that the settings value is incorrect DO NOT write a bad value back to the database.

On the last point, we manually updated the database entry to a good value through SQL. We then tried to re-activate WPML (but had not cleared the permanent object cache). The re-activation failed, presumably because the bad value was retrieved from the cache instead of a good value from the database, and the database entry was then re-written to the bad value. When we re-corrected the database, cleared the object cache, and reactivated the plugin, it worked properly. The point here is, there should never be a time when WPML overwrites a good database value with a bad one. There should be some simple data validation in this instance to make sure that doesn't happen.

December 5, 2023 at 1:16 am #14992081

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Thank you for the detailed explanation! I have created a feature request with our developers team who will review this.

December 11, 2023 at 5:09 pm #15039725

apptioM

I appreciate you raising this issue up to development.

I want to report that the corrupted settings value happened again on our site, overnight at a time when no one was making any edits to it. We are working to try to better identify the root cause, but this has taken our site down twice in the last two weeks after using WPML for 4 years without this happening.

December 12, 2023 at 8:01 pm #15049549

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Thank you for updating me!

As a first step, I recommend updating to the latest version of our plugins found here https://wpml.org/downloads/ or you can go to Plugins -> Add new->Commercial tab -> Check for updates and update.

There are no known issues with WPML's code or an officially compatible plugin that would corrupt the icl_sitepress_Settings database entry, however, there could be a chance that a third-party plugin might cause this behavior.

This would require being able to reproduce the issue or at least locate the plugin that is causing this behavior for our team to be further debug as it sounds like now this is happening more than once.

December 19, 2023 at 5:05 pm #15095463

apptioM

This issue has happened with the current version of the plugin.

Just a reminder that I'm not expecting WPML to solve for the value going bad in the first place. I don't have a reproduce case for it and since the second occurrence we have made some changes to our site to alleviate heavy server volume associated with overnight scans. That server workload may have been a contributor to the problem.

What we want from this ticket is for WPML to implement some data validation around calls that read and write settings values so that if something has gone wrong, the error can be gracefully handled without fatally crashing both the front end and the back end of the site. We also want to ensure that WPML isn't making a the problem worse by committing the bad value to the database if a cached value has become invalid (by whatever means).

December 22, 2023 at 9:36 pm #15121837

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Thank you for clarifying.

I have set this ticket as a feature request and raised this to our developers to review and possibly consider in upcoming versions.

The topic ‘[Feature Request] URGENT: Fatal Errors on Site Caused by WPML calls’ is closed to new replies.