This thread is resolved. Here is a description of the problem and solution.
Problem: If you're experiencing issues with setting up WPML on a site with a large number of products and encountering errors, particularly with automatic translations not working correctly and fatal errors related to Yoast SEO, this might be relevant to you. Solution: We found that the fatal error was related to an incorrect translation of a placeholder in a string from Yoast SEO. The error message indicated an 'Unknown format specifier "t"', which was due to a missing 's' in a placeholder within the Dutch translation of the string:
Fatal error: Uncaught ValueError: Unknown format specifier "t" in /path/to/wordpress-seo/admin/class-yoast-columns.php:41
To resolve this, check the translation of the string and ensure that all format specifiers (like %s, %d, etc.) are correctly translated. The problematic string was: "Admin only notice: this page does not show a meta description because it does not have one, either write it for this page specifically or go into the [%1$s - %2$s] menu and set up a template." If this solution does not apply to your case, or if it seems outdated, 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 issues persist, 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.
Background of the issue:
My site is getting bigger now that I have all needed plugins installed and have about 30,000 products. My main language is Dutch, but most plugins are English. I'm having a hard time setting WPML up. I tried some modifications but I get errors.
Symptoms:
The automatic translation is not fully working as I would like.
Questions:
Could I get assistance (paid if necessary) for someone to help me set it up correctly?
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
Hello,
What kind of errors are you receiving?
Please provide detailed error messages or screenshots.
When it comes to translate strings coming from theme and plugins, take note that those usually get registered on WPML > String Translation while using the source language "English", as this is the international standard language for WordPress.
You can change the source language for any string that is registered on WPML > String Translation.
Could you please increase the WordPress memory limit (WP Memory Limit) to at least 256 MB? WPML requires at least 128M.
Your current values are:
PHP MemoryLimit 512M
WP Memory Limit 40M
You need to connect to your website's server and open the wp-config.php file in a text editor. The file is located in the WordPress root directory.
Add this code to the wp-config.php file to increase WordPress memory:
define ('WP_MEMORY_LIMIT', '256M');
Add this just before this comment:
// That's all, stop editing! Happy blogging.
The current values can be viewed under WPML > Support > WordPress.
These settings can be restricted directly by your hosting provider. Therefore, I recommend contacting them and asking them to change them directly if the changes are not applied immediately.
If adapting the limit will not solve the issue, please let me know.
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
I realized that there is a fatal error related to Yoast SEO:
Fatal error: Uncaught ValueError: Unknown format specifier "t" in /var/www/vhosts/modelspoorforum.nl/test.domburgtrainsupport.nl/wp-content/plugins/wordpress-seo/admin/class-yoast-columns.php:41 Stack trace: #0 /var/www/vhosts/modelspoorforum.nl/test.domburgtrainsupport.nl/wp-content/plugins/wordpress-seo/admin/class-yoast-columns.php(41): sprintf() #1 /var/www/vhosts/modelspoorforum.nl/test.domburgtrainsupport.nl/wp-includes/class-wp-hook.php(324): WPSEO_Yoast_Columns->add_help_tab() #2 /var/www/vhosts/modelspoorforum.nl/test.domburgtrainsupport.nl/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #3 /var/www/vhosts/modelspoorforum.nl/test.domburgtrainsupport.nl/wp-includes/plugin.php(517): WP_Hook->do_action() #4 /var/www/vhosts/modelspoorforum.nl/test.domburgtrainsupport.nl/wp-admin/admin.php(385): do_action() #5 /var/www/vhosts/modelspoorforum.nl/test.domburgtrainsupport.nl/wp-admin/edit.php(10): require_once('/var/www/vhosts...') #6 {main} thrown in /var/www/vhosts/modelspoorforum.nl/test.domburgtrainsupport.nl/wp-content/plugins/wordpress-seo/admin/class-yoast-columns.php on line 41
Disabling Yoast SEO also solves it.
The error message says Unknown format specifier "t". In PHP, sprintf() is a function that formats strings based on placeholders (like %s, %d, etc.). The error is caused by an invalid format specifier ("t") being passed into sprintf() on line 41 of the class-yoast-columns.php file.
This means, very likely you translated a string coming from Yoast SEO and this string inlcudes a placeholder (like %s, %d, etc.). It is likely that this placeholder was not translated correctly and this is triggering an error.
It was the translation for the following string:
"Admin only notice: this page does not show a meta description because it does not have one, either write it for this page specifically or go into the [%1$s - %2$s] menu and set up a template."
The first placeholder was missing the "s" in the Dutch translation.