Skip to content Skip to sidebar

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.

Tagged: 

This topic contains 7 replies, has 3 voices.

Last updated by Dražen 1 year, 3 months ago.

Assisted by: Dražen.

Author Posts
April 3, 2024 at 10:24 am #15477407

samuelK-8

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.

All the best, Samuel

Error log from the recovery email:

WordPress-Version 6.4.3
Aktives Theme: Bridge (Version 30.4)
Aktuelles Plugin: WooCommerce (Version 8.7.0)
PHP-Version 8.1.27

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

April 3, 2024 at 10:46 am #15477545

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi Samuel,

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?

Let me know how it goes, please.

Regards,
Drazen

April 3, 2024 at 2:32 pm #15478994

Alejandro
WPML Supporter since 02/2018

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.

Regards.

April 3, 2024 at 4:24 pm #15479553

samuelK-8

Thank you very much for all your advices.

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?

April 4, 2024 at 6:19 am #15481007

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

as my colleague said the issue is probably with the wrong translation of that string or similar.

Let me check, and if you have a staging site that would be nice so I do not create a crash on your production site.

Please provide wp-admin and FTP access.

Make sure you have a backup.

Thanks,
Drazen

April 4, 2024 at 9:12 am #15481819

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks.

Our developers have identified the problem and it is escalated for further check and fix.

In the meantime, you can use the next workaround, which I already applied and it works fine for you.

WORKAROUND: Remove the woocommerce-de_DE.mo file from /wp-content/languages/missing/

I will update you when I have more news or a permanent fix is released.

Regards,
Drazen

April 4, 2024 at 10:54 am #15482505

samuelK-8

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?

April 4, 2024 at 10:58 am #15482545

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi Samuel,

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