Skip Navigation

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

Problem:
If you're experiencing a fatal error stating 'Uncaught Error: Call to undefined function mb_ereg_replace_callback()', it indicates that your server is missing the Multibyte String Extension, which is crucial for the WPML plugin to function correctly.
Solution:
We recommend installing the Multibyte String Extension on your server to resolve this issue. Additionally, ensure that your server meets all the minimum requirements specified by WPML.

If this solution does not apply to your case, or if it seems outdated, please open a new support ticket. 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. For further assistance, you can also visit our support forum at WPML Support 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.

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by Andrey 9 months ago.

Assisted by: Andrey.

Author Posts
August 14, 2024 at 8:09 pm #16071973

Marco

Background of the issue:
In 2020 we built a website with NL as the base language and UK as the second language. Now we are working on a restyling where UK will be the base language. WPML was deactivated, NL content was removed, and UK pages were redesigned. We reactivated WPML and want to translate the NL pages via the Advanced Translation Editor.

Symptoms:
There has been a critical error on this website.

Questions:
What am I doing wrong?

August 14, 2024 at 8:49 pm #16072513

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

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

Thank you for contacting WPML support.

You must update your WPML plugin and add-ons to the latest version, 4.6.12, to benefit from the latest bug fixes and improvements. This may not necessarily resolve your problem; however, we need to work on the newest code available to troubleshoot the issue best.

You can check the latest released versions under "My Account -> Downloads" on this site. Instructions to update can be found here: http://wpml.org/faq/install-wpml/

If you do not see the updates, you might need to click the Check for updates button in the Plugins → Add New Plugin → Commercial tab.

Remember to backup your database before you proceed.

Please share some screenshots if the issue persists after an update.

August 16, 2024 at 6:00 am #16076734

Marco

problem is still there. When I try to translate a page I get an error.

Scherm­afbeelding 2024-08-16 om 07.58.09.png
Scherm­afbeelding 2024-08-16 om 07.57.25.png
August 17, 2024 at 2:47 pm #16080227

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

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

You need to see what the errors are. Guessing what might be the problem and trying different solutions may lead to even more trouble. The first step is to enable debugging. You can do this by adding a few lines to the site’s wp-config.php file. With the error log enabled, you will see what the actual problem is.

To enable it, open your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:

define('WP_DEBUG', true);

In order to enable the error logging to a file on the server you need to add yet one more similar line:

define( 'WP_DEBUG_LOG', true );

In this case, the errors will be saved to a debug.log log file inside the /wp-content/directory.

https://wpml.org/documentation/support/debugging-wpml/

Let me know what you see after the debug mode has been enabled.

August 19, 2024 at 8:28 am #16082367

Marco

This is the error:

Fatal error: Uncaught Error: Call to undefined function mb_ereg_replace_callback() in /var/www/test.connectyourhosting.com/htdocs/wp-content/plugins/sitepress-multilingual-cms/classes/xliff/class-wpml-tm-validate-html.php:124 Stack trace: #0 /var/www/test.connectyourhosting.com/htdocs/wp-content/plugins/sitepress-multilingual-cms/classes/xliff/class-wpml-tm-validate-html.php(34): WPML_TM_Validate_HTML->hide_wp_bugs() #1 /var/www/test.connectyourhosting.com/htdocs/wp-content/plugins/sitepress-multilingual-cms/classes/xliff/wpml-tm-xliff.php(196): WPML_TM_Validate_HTML->validate() #2 /var/www/test.connectyourhosting.com/htdocs/wp-content/plugins/sitepress-multilingual-cms/classes/xliff/wpml-tm-xliff.php(169): WPML_TM_XLIFF->validate() #3 /var/www/test.connectyourhosting.com/htdocs/wp-content/plugins/sitepress-multilingual-cms/classes/xliff/wpml-tm-xliff.php(141): WPML_TM_XLIFF->appendData() #4 /var/www/test.connectyourhosting.com/htdocs/wp-content/plugins/sitepress-multilingual-cms/classes/xliff/class-wpml-tm-xliff-writer.p in /var/www/test.connectyourhosting.com/htdocs/wp-content/plugins/sitepress-multilingual-cms/classes/xliff/class-wpml-tm-validate-html.php on line 124

There has been a critical error on this website. Please check your site admin email inbox for instructions.

August 19, 2024 at 12:48 pm #16083526

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

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

Thank you for providing details about the fatal error.

Based on my assessment, your server seems to be missing the Multibyte String Extension, mainly the "mb_ereg_replace_callback" function. Once you install the extension, the issue should be resolved.

Additionally, please ensure that your server meets all the minimum requirements specified at https://wpml.org/home/minimum-requirements/.

August 19, 2024 at 9:29 pm #16085273

Marco

Its working now!
Thanks