[Resolved] Changed standard language gives Critical error.
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.
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.
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.
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.
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.