Home›Support›English Support›[Resolved] WPML String Translation creates fatal error together with WooCommerce
[Resolved] WPML String Translation creates fatal error together with WooCommerce
This thread is resolved. Here is a description of the problem and solution.
Problem: The client's site crashed after updating to the latest WPML String Translation and WooCommerce.
Ein Fehler vom Typ E_ERROR wurde in der Zeile 234 der Datei /kunden/xxx/webseiten/wp-content/plugins/woocommerce/includes/class-wc-post-types.php verursacht. Fehlermeldung: Uncaught ValueError: Missing format specifier at end of string in /xxxx/webseiten/wp-content/plugins/woocommerce/includes/class-wc-post-types.php:234
Solution: We have identified the problem and escalated it for further investigation and resolution. As a temporary workaround, we recommend removing the
woocommerce-de_DE.mo
file from the
/wp-content/languages/missing/
directory.
Please note that this solution may become outdated or might not apply to your case. If the problem persists, we encourage you to check for related known issues, verify the version of the permanent fix, and ensure that you have the latest versions of themes and plugins installed. If you still need assistance, please do not hesitate to open a new support ticket in the 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.
Hi,
my entire site crashed after updating to latest WPML String Translation and latest WooCommerce. After disabling WPML ST the site is back. I can reproduce the error as the site goes down as soon I enable WPML ST again.
May be the issue is resolved after updating to WP 6.5, but ususally I wait a few days to be sure that the Plugins are up to date.
Fehler-Details
==============
Ein Fehler vom Typ E_ERROR wurde in der Zeile 234 der Datei /kunden/xxx/webseiten/wp-content/plugins/woocommerce/includes/class-wc-post-types.php verursacht. Fehlermeldung: Uncaught ValueError: Missing format specifier at end of string in /xxxx/webseiten/wp-content/plugins/woocommerce/includes/class-wc-post-types.php:234
Stack trace:
#0 /kunden/xxx/webseiten/wp-content/plugins/woocommerce/includes/class-wc-post-types.php(234): sprintf()
#1 /kunden/xxx/webseiten/wp-includes/class-wp-hook.php(324): WC_Post_Types::register_taxonomies()
#2 /kunden/xxx/webseiten/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#3 /kunden/xxx/webseiten/wp-includes/plugin.php(517): WP_Hook->do_action()
#4 /kunden/xxx/webseiten/wp-settings.php(643): do_action()
#5 /kunden/xxx/webseiten/wp-config.php(106): require_once('...')
#6 /kunden/xxx/webseiten/wp-load.php(50): require_once('...')
#7 /kunden/xxx/webseiten/wp-admin/admin.php(34): require_once('...')
#8 /kunden/xxx/webseiten/wp-admin/plugins.php(10): require_once('...')
#9 {main}
thrown
Thank you for contacting WPML support. Let me provide you with the first debugging steps and try to help with the issue quickly.
Can you please check if the issue still happens when using the WP default theme and only WPML plugins and WooCommerce enabled, all other disabled.
Please make a backup before proceeding.
From the message you shared I see the error is coming from WC; so not sure how WPML ST is causing it and it goes away when disabled, or maybe the error message in the debug log is a different one, can you please check?
Languages: English (English )Spanish (Español )Italian (Italiano )
Timezone: Europe/Rome (GMT+02:00)
Hello there! I think we found the source of this issue.
The error is happening on a string coming from WooCommerce:
__( 'All %s', 'woocommerce' )
and it's very likely this string was wrongly translated and since you have PHP version 8.1, this becomes an error and not a warning.
You can downgrade php to version 8.0 temporarily and then go to WPML > String Translation and look for the string above "All %s" coming from the "WooCommerce" domain. check its translation and make sure the "%s" is left AS-IS since it should NOT be translated.
Then, check the error log if you have i enabled to see if the warning about this keeps appearing and if it doesn't, then you can upgrade to PHP 8.1 again.
If you have any doubt about what i mentioned above, please let us know so we can be more helpful.
I have downgraded the site to PHP 8.0.30. (I checked it in the frontend with an info.php file.)
But as soon I activated WPML String Translation, the site again crashed in the backend; WP sent me a recovery email and I could again deactivate WPML ST and the site was back.
Then I followed Drazen's advices: I deactivated all plugins except WooCommerce and the WMPL Plugins (WPML ST and WooCommerce Multilingual & Multicurrency were still deactivated). Then I switched the theme to 20-24 and activated WMPL ST: The site crashed immediately (in the backend). Deactivating WPML ST brought the site back again.
I was thinking of downgrading the WMPL ST version to the previous version. It worked fine until this morning... - Do you need more information about the issue?
Dear Drazen and Alejandro, thank you very much for your swift and professional help with the issue. I am glad that my site is back and my hint is helping you to improve the product, and I will observe the further releases. - Is there a way to give you / your company a donation?
thanks for getting back, glad to hear we were helpful.
We appreciate the offer, but there is no need for any further payment, thank you. You are a valuable client of the WPML products and we do our best to provide support help when needed.
Regards,
Drazen
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.