Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing errors when attempting to add translations to a page or a post after migrating their website to a production domain. The debug log file shows the following error:

PHP Fatal error:  Uncaught Error: Call to undefined function mb_ereg_replace_callback() in ....../wp-content/plugins/sitepress-multilingual-cms/classes/xliff/class-wpml-tm-validate-html.php:124

Solution:
We have identified that the 'Multibyte String' PHP extension is not enabled on the client's server, which is necessary for WPML to function correctly. We recommend contacting the hosting provider to enable this extension. For more details on the 'Multibyte String' PHP extension, please visit WPML's minimum requirements and the PHP manual.

If this solution does not apply to your case, or if it is outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, please open a new support ticket in our forum.

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.

This topic contains 5 replies, has 3 voices.

Last updated by Mohamed Sayed 1 year, 2 months ago.

Assisted by: Mohamed Sayed.

Author Posts
February 28, 2024 at 9:57 am #15352925

claymoreP

Dear WPML Support Team,

I hope this message finds you well. I am reaching out to request assistance with an issue I've encountered with the WPML Multilingual CMS plugin on my website (hidden link).

While the plugin worked seamlessly on our development server, we've run into problems after migrating to our production domain. Specifically, we are experiencing errors when attempting to add translations to a page or a post. This issue has significantly impacted our ability to manage and update multilingual content on our website.

February 28, 2024 at 9:59 am #15352941

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi there.

Before this ticket gets assigned to my colleagues, can you please elaborate a bit more on this matter?

Can you please explain what you are trying to accomplish, what are the exact steps that you are taking, what is not working and how would you expect to see things happening? Do you see any error messages? And if you do see error messages, can you please send us a copy of those?

Please let us know.

Thank you.

Kind regards,
Mihai Apetrei

February 28, 2024 at 10:08 am #15352970

claymoreP

When i try to add the translation of a page for example, i get the error from the uploaded image.

this is the mail i get automatically when the error shows:

"Howdy!

WordPress has a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.

In this case, WordPress caught an error with one of your plugins, WPML Multilingual CMS.

First, visit your website (hidden link) and check for any visible issues. Next, visit the page where the error was caught (hidden link) and check for any visible issues. "

i tried to deactivate and even to delete the plugins: WPML Multilingual CMS and WPML String Translation. but still the same issue.

the id at the end of the error mail link changes.

Screenshot 2024-02-28 at 12.01.48.png
February 28, 2024 at 12:14 pm #15353733

Mohamed Sayed

Hi,
Thanks for contacting WPML support.

Please provide us with the WordPress debug.log, this will allow us to see which PHP errors are being produced. More Info: https://wordpress.org/support/article/debugging-in-wordpress/

To enable it, open your wp-config.php file and look for:

define('WP_DEBUG', false);

And change it to:

define('WP_DEBUG', true);
// Enable Debug logging to the /wp-content/debug.log file
define('WP_DEBUG_LOG', true);
// Disable display of errors and warnings which is recommended on a live site.
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors',0);

Then try to reproduce the issue by translating a page and check if any errors were saved to the debug.log log file inside the /wp-content/ directory.

If you can paste your debug.log to https://pastebin.com/ and provide me that link, it would be great!

Kind regards,
Mohamed

February 28, 2024 at 12:28 pm #15353809

claymoreP

Hello,

here is the link:

https://pastebin.com/hBQUWDHf

February 28, 2024 at 4:10 pm #15354940

Mohamed Sayed

The debug log shows the following error:

[28-Feb-2024 12:24:04 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function mb_ereg_replace_callback() in ....../wp-content/plugins/sitepress-multilingual-cms/classes/xliff/class-wpml-tm-validate-html.php:124

It seems that the "Multibyte String" PHP extension is not enabled by your server, which is required for WPML to work properly: https://wpml.org/home/minimum-requirements/

Please contact the hosting provider and ask them to enable it on your site. Kindly check this link for more details: hidden link

Kind regards,
Mohamed