Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:

The German version of the website was causing fatal errors, breaking the site after the latest updates.

The PHP error was: "Uncaught ValueError: Missing format specifier at end of string in /wp-content/plugins/woocommerce/includes/class-wc-post-types.php:234".

Solution:

- Go to WordPress Dashboard > WPML > String Translation.
- Search for "All %s" with the "Exact Match" option enabled.
- In the result, click the German language and make sure that "%s" is also in the translation.

0% of people find this useful.

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 10 replies, has 2 voices.

Last updated by luca8link 1 year, 9 months ago.

Assisted by: Christopher Amirian.

Author Posts
February 18, 2023 at 3:30 pm #13062005

luca8link

Hey there, after the latest updates, the site breaks only on the german version e.g.

hidden link

hidden link

The first one works, the second one (same site) triggers a fatal error

Screenshot 2023-02-18 at 16.38.03.png
February 19, 2023 at 5:07 pm #13065059

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

Would you please follow the steps below?

- Go to WPML > String Translation
- Open the translation of the string "All %s" within the domain woocommerce and simply save it again for all languages.

Screenshot:
hidden link

This error happens when there is a PHP %s directive in the original language and the translation misses that %s.

Thanks.

February 20, 2023 at 6:40 am #13066639

luca8link

Thanks for the quick reply, Christopher. I did what you suggested but unfortunately nothing changed.

February 20, 2023 at 1:42 pm #13070387

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Thank you. Would you please copy your website to a staging version so that we can do troubleshooting without the fear to ruin the website?

Please make sure the next reply is private.

Alternatively, we can give you the means to move your website to our server if it is under 1G

Thanks.

February 20, 2023 at 2:14 pm #13070797

luca8link

Thank you. Cloning the site on staging right now. Please let me have an email address to invite you to the staging site. Please also advise on how to make the reply private as I can't see anything to do it 😉

February 21, 2023 at 2:47 pm #13080409

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

Thank you I have the website and tried a few things and no results for now.

I wonder if this is happening only on the products or other pages too?

February 21, 2023 at 4:27 pm #13081341

luca8link

Thanks Christopher. Right now, not even the home page is visible at hidden link while it's working on the other languages

February 21, 2023 at 4:28 pm #13081343

luca8link

I keep on getting emails like the following for the .de translation

Hallo!

Seit WordPress 5.2 gibt es eine eingebaute Funktion, die erkennt, wenn ein Plugin oder ein Theme einen fatalen Fehler auf deiner Website verursacht, und dich deswegen mit dieser automatisierten E-Mail benachrichtigt.

In diesem Fall hat WordPress einen Fehler in einem deiner Plugins, WooCommerce, abgefangen.

Besuche zunächst deine Website (hidden link) und überprüfe sie auf sichtbare Probleme. Besuche als nächstes die Seite, auf der der Fehler aufgetreten ist (hidden link) und prüfe, ob es sichtbare Probleme gibt.

Bitte kontaktiere dein Hosting-Unternehmen, um Unterstützung bei der weiteren Untersuchung dieses Problems zu erhalten.

Wenn deine Website fehlerhaft zu sein scheint und du nicht mehr wie gewohnt auf dein Dashboard zugreifen kannst, hat WordPress jetzt einen speziellen „Wiederherstellungsmodus“. Auf diese Weise kannst du dich sicher in deinem Dashboard anmelden und weitere Untersuchungen durchführen.

hidden link

Um deine Website zu schützen, läuft dieser Link in 1 Tag ab. Aber keine Sorge: Ein neuer Link wird dir per E-Mail zugeschickt, wenn der Fehler nach Ablauf der Frist erneut auftritt.

Wenn du Hilfe bei diesem Problem suchst, wirst du möglicherweise nach einigen der folgenden Informationen gefragt:
WordPress-Version 6.1.1
Aktives Theme: Avada (Version 7.9.2)
Aktuelles Plugin: WooCommerce (Version 7.4.0)
PHP-Version 8.0.28

Fehler-Details
==============
Ein Fehler vom Typ E_ERROR wurde in der Zeile 234 der Datei /home/238066.cloudwaysapps.com/mnxndbducq/public_html/wp-content/plugins/woocommerce/includes/class-wc-post-types.php verursacht. Fehlermeldung: Uncaught ValueError: Missing format specifier at end of string in /home/238066.cloudwaysapps.com/mnxndbducq/public_html/wp-content/plugins/woocommerce/includes/class-wc-post-types.php:234
Stack trace:
#0 /home/238066.cloudwaysapps.com/mnxndbducq/public_html/wp-content/plugins/woocommerce/includes/class-wc-post-types.php(234): sprintf()
#1 /home/238066.cloudwaysapps.com/mnxndbducq/public_html/wp-includes/class-wp-hook.php(308): WC_Post_Types::register_taxonomies()
#2 /home/238066.cloudwaysapps.com/mnxndbducq/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#3 /home/238066.cloudwaysapps.com/mnxndbducq/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#4 /home/238066.cloudwaysapps.com/mnxndbducq/public_html/wp-settings.php(617): do_action()
#5 /home/238066.cloudwaysapps.com/mnxndbducq/public_html/wp-config.php(79): require_once('/home/238066.cl...')
#6 /home/238066.cloudwaysapps.com/mnxndbducq/public_html/wp-load.php(50): require_once('/home/238066.cl...')
#7 /home/238066.cloudwaysapps.com/mnxndbducq/public_html/wp-login.php(12): require('/home/238066.cl...')
#8 {main}
thrown

February 22, 2023 at 7:59 am #13085607

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Thank you very much. I reported this to the second tier and will get back to you as soon as we have an answer.

Thanks.

February 22, 2023 at 12:32 pm #13088795

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

I have an answer and it is working in the staging now:

- Go to WordPress Dashboard > WPML > String Translation.
- Search for "All %s" with the "Exact Match" option enabled according to the attached screenshot.
- In the result, click the German language and make sure that "%s" is also in the translation.

Thanks.

Screenshot 2023-02-22 at 16.30.37.png
February 22, 2023 at 12:52 pm #13089147

luca8link

It worked! Thank you so much!