Background of the issue:
I am trying to resolve two errors related to the WPML plugin (sitepress-multilingual-cms) on my site. I see several warnings and deprecated messages. Here are the details:
Warning unserialize(): Error at offset 2690 of 24175 bytes
wp-includes/functions.php:650 Count:1 Plugin: wpml-string-translation
Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated. File: wp-includes/formatting.php:2819. Count: 600. Plugin: sitepress-multilingual-cms. Screenshot: hidden link. The second error is: 'Some taxonomies in your site are forced to be untranslatable. This is causing a problem when you're trying to run a multilingual WooCommerce site.' Screenshot: hidden link and hidden link. Link to a page where the issue can be seen: hidden link.
Symptoms:
I am experiencing warnings and deprecated messages related to the WPML plugin. Specifically, there is a deprecated message: 'rtrim(): Passing null to parameter #1 ($string) of type string is deprecated' and an issue with taxonomies being forced to be untranslatable, affecting my multilingual WooCommerce site.
While one of my teammates is working on your ticket, I’ll provide you with some initial debugging steps.
Please update WPML to version 4.7.1 and its add-ons to the latest version. Have you tried the steps mentioned in that message regarding the second issue?
This update will allow you to benefit from the latest bug fixes and improvements. Although it may not directly resolve your issue, it's crucial for troubleshooting with the most current code.
You can check for the latest available versions by visiting "My Account -> Downloads" on our website. Instructions for updating can be found here: http://wpml.org/faq/install-wpml/.
If you do not see any updates available, you may need to click the "Check for Updates" button in the Plugins → Add New Plugin → Commercial tab.
Please remember to back up your database before proceeding with any updates.
Yes, I have already updated the plugins to the latest version. Some errors, like Deprecated warnings, have disappeared, but these still remain: hidden link
Additionally, the error **"Some taxonomies in your site are forced to be untranslatable. This is causing a problem when you're trying to run a multilingual WooCommerce site."** still persists.
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
Hello,
It might be the case that you translated something in WPML String Translation in a way that it is not supposed to be translated and this is causing an error.
Example:
Welcome, %1$s. Your balance is %2$d.
Here we have two placeholders:
%1$s
%2$d
If both placeholders are not identical on the translated string, you will run into an error.
Hello,
How can I find the exact lines that need to be checked for this error? The website is quite large, with its own theme, and several of our editors are working on it. There are a lot of lines of code—how can I identify the problematic ones?
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
I would suggest using the text search field at WPML > String Translation and trying to search for the mentioned placeholders, then verify if they are translated correctly.
Anyhow, it could be that the issue is even caused by a completely different string.
I would like to offer to take a closer look and request temporary access (wp-admin and FTP) to the site to investigate the issue further.
The required fields are below the comment section when you log in to leave the next reply. The information you provide is private, meaning only you and I can see and access it.
IMPORTANT
Please be sure to back up the site and database before granting us access.
If you can't see the "wp-admin / FTP" fields, your post and site login details will be set to "PUBLIC". DO NOT publish the data unless you see the required wp-admin / FTP fields.
The private reply form looks like this: hidden link
The next time you reply, click on "I still need assistance".
Video: hidden link
Please note that we are obliged to request this information individually on each ticket. We are not allowed to access any credentials that were not specifically submitted on this ticket in the private response form.