[Resolved] WPML String Translation causes Error 500 on one Language
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing an Error 500 on the German language page of their WooCommerce site when WPML String is activated. Deactivating WPML String resolves the checkout issue but not the Error 500.
Solution: 1. Enable WordPress debug mode by following the guide at Debugging in WordPress. 2. Reproduce the error by visiting the problematic page. 3. Check the debug.log for errors. The logs indicated a fatal error caused by the WooCommerce plugin, specifically a missing format specifier in 'class-wc-post-types.php' on line 237. 4. Temporarily deactivate WooCommerce to confirm if the site loads without errors.
If these steps do not resolve the issue or if the solution seems outdated or irrelevant to your case, please check for related known issues at WPML Known Issues and ensure all themes and plugins are up to date. If problems persist, we recommend opening a new support ticket for further assistance.
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 have German, French, and English languages on my WooCommerce site. The issue can be seen on this page: hidden link
I have deactivated all plugins and found WPML String to be the cause. All min requirements are met and plugins at latest version.
Symptoms:
I am experiencing an Error 500 on the German language page. The English and French pages still work - if I deactivate WPML String then checkout no longer works for all languages
Questions:
Why does the German page cause an Error 500?
I kindly ask you to follow these steps to get more information about the error:
- Activate the WordPress debug mode by following the steps described in this guide: https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/
- Reproduce the error by visiting hidden link
- Share the latest fatal error registered in the debug.log file located within the wp-content folder
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the myworks-sync-for-xero 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 /home/bouncybo/www/nginx/maplestore.eu/wordpress/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the woocommerce-paypal-payments 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. Weitere Informationen: Debugging in WordPress (engl.) (Diese Meldung wurde in Version 6.7.0 hinzugefügt.) in /home/bouncybo/www/nginx/maplestore.eu/wordpress/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the mametwint 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. Weitere Informationen: Debugging in WordPress (engl.) (Diese Meldung wurde in Version 6.7.0 hinzugefügt.) in /home/bouncybo/www/nginx/maplestore.eu/wordpress/wp-includes/functions.php on line 6114
Fatal error: Uncaught ValueError: Missing format specifier at end of string in /home/bouncybo/www/nginx/maplestore.eu/wordpress/wp-content/plugins/woocommerce/includes/class-wc-post-types.php:237 Stack trace: #0 /home/bouncybo/www/nginx/maplestore.eu/wordpress/wp-content/plugins/woocommerce/includes/class-wc-post-types.php(237): sprintf('Alle %', 'Brand') #1 /home/bouncybo/www/nginx/maplestore.eu/wordpress/wp-includes/class-wp-hook.php(324): WC_Post_Types::register_taxonomies('') #2 /home/bouncybo/www/nginx/maplestore.eu/wordpress/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #3 /home/bouncybo/www/nginx/maplestore.eu/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #4 /home/bouncybo/www/nginx/maplestore.eu/wordpress/wp-settings.php(704): do_action('init') #5 /home/bouncybo/www/nginx/maplestore.eu/wordpress/wp-config.php(96): require_once('/home/bouncybo/...') #6 /home/bouncybo/www/nginx/maplestore.eu/wordpress/wp-load.php(50): require_once('/home/bouncybo/...') #7 /home/bouncybo/www/nginx/maplestore.eu/wordpress/wp-blog-header.php(13): require_once('/home/bouncybo/...') #8 /home/bouncybo/www/nginx/maplestore.eu/index.php(17): require('/home/bouncybo/...') #9 {main} thrown in /home/bouncybo/www/nginx/maplestore.eu/wordpress/wp-content/plugins/woocommerce/includes/class-wc-post-types.php on line 237
Es gab einen kritischen Fehler auf deiner Website.
Erfahre mehr über die Problembehandlung in WordPress.
As you can see in the Fatal Error, the cause of the problem is the Woocommerce plugin. If you deactivate Woocommerce (for testing) the German version of the site should appear again.
Strange because when I disable WPML String (with all other plugins running) then the error does not appear. Does the error log show it is woocommerce the culprit?
Yes, you can read in the Fatal Error message that the problem comes from Woocommerce:
Fatal error: Uncaught ValueError: Missing format specifier at end of string in /home/bouncybo/www/nginx/maplestore.eu/wordpress/wp-content/plugins/woocommerce/includes/class-wc-post-types.php:237 Stack trace: #0 /home/bouncybo/www/nginx/maplestore.eu/wordpress/wp-content/plugins/woocommerce/includes/class-wc-post-types.php(237): sprintf('Alle %', 'Brand') #1 /home/bouncybo/www/nginx/maplestore.eu/wordpress/wp-includes/class-wp-hook.php(324): WC_Post_Types::register_taxonomies('') #2 /home/bouncybo/www/nginx/maplestore.eu/wordpress/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #3 /home/bouncybo/www/nginx/maplestore.eu/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #4 /home/bouncybo/www/nginx/maplestore.eu/wordpress/wp-settings.php(704): do_action('init') #5 /home/bouncybo/www/nginx/maplestore.eu/wordpress/wp-config.php(96): require_once('/home/bouncybo/...') #6 /home/bouncybo/www/nginx/maplestore.eu/wordpress/wp-load.php(50): require_once('/home/bouncybo/...') #7 /home/bouncybo/www/nginx/maplestore.eu/wordpress/wp-blog-header.php(13): require_once('/home/bouncybo/...') #8 /home/bouncybo/www/nginx/maplestore.eu/index.php(17): require('/home/bouncybo/...') #9 {main} thrown in /home/bouncybo/www/nginx/maplestore.eu/wordpress/wp-content/plugins/woocommerce/includes/class-wc-post-types.php on line 237
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.