[Resolved] Critical Error Occurs Upon Activating WPML Plugin
This thread is resolved. Here is a description of the problem and solution.
Problem: If you're trying to activate the WPML plugin on your WordPress site and encounter a critical error that makes the site inaccessible, this might be due to an issue with string translations. Solution: We recommend following these steps to resolve the issue: 1. Navigate to WPML >> String Translation. 2. Search for the %s string. 3. Correct its translation. After these adjustments, your site should regain accessibility in all configured languages. If the problem persists, it might be related to a known issue with PHP 8, as detailed in our errata: PHP 8 PHP Fatal Error: Uncaught ValueError: Unknown format specifier.
If this solution does not apply because it's outdated or not relevant to your case, 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. Should you need further assistance, please open a new support ticket 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:
I am trying to activate the WPML plugin to enable language translation on our WordPress site at hidden link. This is essential for setting up a multilingual site.
Symptoms:
Whenever I try to activate the WPML plugin, the site encounters a critical error and becomes inaccessible.
Questions:
How can I resolve the critical error that occurs when activating the WPML plugin?
What steps should I follow to successfully activate WPML without causing a site error?
Thank you for contacting WPML Support. Could you please follow the below steps and let me know how it goes:
1. The current WP Memory Limit on your site is 40MB. The WP memory limit needs to be increased, it's different from PHP memory. PHP memory is fine but WordPress uses 40MB as default in your site. The minimum requirements for WPML are 128MB: https://wpml.org/home/minimum-requirements/
Please add this line to your wp-config.php file to increase WP memory, wp-config.php file is located in the root of your WP install:
You can add it anywhere in your file. I recommend placing it right before the following line:
/* That's all, stop editing! Happy blogging. */
2. If the issue persists after increasing WP memory, please enable error reporting on your site as we need to see the details of the latest error log to understand the cause of the issue better. To enable it, open your ‘wp-config.php’ file and look for ‘define(‘WP_DEBUG’, false);’. Change it to:
// Enable WP_DEBUG mode
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
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
define( 'SCRIPT_DEBUG', true );
After adding the above code, please try activating the WPML plugin again, and if this process creates a debug.log file in your site's wp-content directory. Please send us its contents.
whenever i am activating string translation plugin i am still getting error when i went for arabic pages, if i deactivate the string tranlation plugin the arabic page will come
Thanks for the additional details. To take a closer look at this issue, please provide temporary access (WP-Admin and FTP Login info) to your site (preferably staging site), so that I can look into your setup and debug the issue.
Your next answer will be private, meaning only you and I can access it.
=== Please backup your database and website ===
✙ I would additionally need your permission to deactivate and reactivate Plugins and the Theme and to change configurations on the site. This is also a reason the backup is essential.