Background of the issue:
I am trying to update the translated web pages for benoitviaudenturologiste.com. I changed it to debug mode and encountered errors when switching languages. The issue can be seen at: hidden link
Symptoms:
I receive the following errors: 'Deprecated: mb_strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /home/benoitviaudentur/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php on line 154' and 'Warning: Cannot modify header information – headers already sent by (output started at /home/benoitviaudentur/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php:154) in /home/benoitviaudentur/public_html/wp-includes/functions.php on line 7168'.
Questions:
How can I resolve the deprecated mb_strlen() error?
What steps should I take to fix the header information warning?
Thank you for contacting WPML support. I'll be happy to help you with this. Please check in your wp-config.php and see if the debug display is set to true. if so, it should be set to false. It should look like this:
Also, make sure your WordPress version and PHP version is up to date. While this is not related, I did notice that the WP memory is below the required limit. Please try increasing the WP Memory Limit. Minimum requirements are 128Mb: https://wpml.org/home/minimum-requirements/
You can add this to wp-config.php to increase WP memory:
Add it above the line /* That's all, stop editing! Happy blogging. */
Once this is done, please follow these steps on the page you tried to edit when you saw this error:
1. Go to WPML -> Translation Management -> Translation Jobs and cancel the in progress job. If there is no in progress job, continue to the next steps.
2. Edit the default page. Make any small change and update the page.
3. Go to WPML -> Translation Management and send this page to the translation basket. Tick the checkbox, scroll down and click translate, then you will see the translation basket tab.
4. Click the translation basket and send the page to yourself as a translator.
5. Go to WPML -> Translations and take and translate the page. Save the translation 100% and then let's see if the correct content shows.
If this does not resolve the issue, please let me know and we can further troubleshoot.