This thread is resolved. Here is a description of the problem and solution.
Problem:
The client reported a critical error on the Swedish translation of their website, preventing it from displaying correctly in the frontend.
Solution:
We identified that the issue was due to incorrect translation of placeholders in strings. Here are the steps we recommended and implemented to resolve the issue:
1. Navigate to WPML >> String Translation.
2. Search for strings containing the placeholder %s.
3. Correct the translation in the Swedish language.
For example, we changed the string:
Använd %1$anpassad CSS%3$ för att styla ditt innehåll eller lägg till %2$prefixet "selector"%3$ för att rikta in dig på specifika element.
To:
Använd %1$s anpassad CSS%3$ för att styla ditt innehåll eller lägg till %2$s prefixet "selector"%3$ för att rikta in dig på specifika element.
After making these corrections, the Swedish pages loaded correctly.
If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable 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. If the problem persists, please open a new support ticket.
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: Exception, Known issue
This topic contains 7 replies, has 0 voices.
Last updated by rubenK-8 2 weeks, 4 days ago.
Assisted by: Noman.
Author | Posts |
---|---|
May 11, 2025 at 5:15 pm #17020528 | |
rubenK-8 |
Background of the issue: Symptoms: Questions: |
May 11, 2025 at 5:32 pm #17020552 | |
Noman WPML Supporter since 06/2016
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
Hi, Thank you for contacting WPML Support. I can see the issue on your site. Could you please enable error reporting on your site as I 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 visiting the problematic page again, and if this will create a debug.log file in your site's wp-content directory. Please send me its contents. Please let me know the results, |
May 12, 2025 at 2:07 am #17020883 | |
rubenK-8 |
I send the debug through a reply |
May 12, 2025 at 8:43 am #17021516 | |
Noman WPML Supporter since 06/2016
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
Thanks for sharing the debug info. That part looks fine, but what I actually need is the debug.log file. The debug info you shared shows details about themes and plugins, while the debug.log file records any errors that happen when you visit a page like this one: hidden link, which is currently showing a blank/critical error. Could you please check if there's a debug.log file in your /wp-content/ folder after adding the above provided code in wp-config.php file and share its contents? Here is a doc for more details: Thank you for your cooperation |
May 13, 2025 at 10:49 am #17026606 | |
rubenK-8 |
[13-May-2025 10:45:34 UTC] PHP Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the mailpoet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-notifier domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-styles domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mailpoet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-notifier domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-styles domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mailpoet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-notifier domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-styles domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mailpoet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-notifier domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-styles domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mailpoet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-notifier domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-styles domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mailpoet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-notifier domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-styles domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mailpoet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-notifier domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-styles domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mailpoet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-notifier domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-styles domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mailpoet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-notifier domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-styles domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mailpoet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-notifier domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-notifier domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-styles domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-styles domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mailpoet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mailpoet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-notifier domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-styles domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-notifier domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-styles domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-notifier domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-styles domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mailpoet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-notifier domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-styles domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-notifier domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-styles domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mailpoet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-notifier domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-styles domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mailpoet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-notifier domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mphb-styles domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 mailpoet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /data/sites/web/slowlifeswedencom/www/wp-includes/functions.php on line 6121 |
May 13, 2025 at 3:32 pm #17028867 | |
Noman WPML Supporter since 06/2016
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
Thanks for sharing the error details. This type of usually occur when placeholder(%s) string is wrongly translated somehow as mentioned here: https://wpml.org/errata/php-8-php-fatal-error-uncaught-valueerror-unknown-format-specifier-in/ To fix this issue, could you please try the below steps: 1. Go to the WPML >> String Translation. And see if this resolves the issue. If the issue persists, 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. Thank you for your cooperation |
May 19, 2025 at 8:45 am #17047259 | |
Noman WPML Supporter since 06/2016
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
Thanks for providing the login details. I’m debugging this issue on your site and get back to you with an update soon. Thank you for your cooperation |
May 19, 2025 at 12:42 pm #17048461 | |
Noman WPML Supporter since 06/2016
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
I found the problematic string and corrected the placeholder by replacing: Använd %1$anpassad CSS%3$ för att styla ditt innehåll eller lägg till %2$prefixet "selector"%3$ för att rikta in dig på specifika element. With: Använd %1$s anpassad CSS%3$ för att styla ditt innehåll eller lägg till %2$s prefixet "selector"%3$ för att rikta in dig på specifika element. via WPML >> String Translation. The Swedish pages now load correctly. Could you please check and confirm on your side? Thank you for your cooperation and patience |
May 19, 2025 at 7:18 pm #17050347 | |
rubenK-8 |
Thank you |