Skip Navigation

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.

Tagged: 

This topic contains 0 reply, has 0 voices.

Last updated by Andreas W. 7 months, 2 weeks ago.

Assisted by: Andreas W..

Author Posts
November 21, 2024 at 8:45 pm #16431068

martinD-95

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?

November 21, 2024 at 10:47 pm #16431283

Andreas W.
WPML Supporter since 12/2018

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.

Guide:
https://wpml.org/documentation/getting-started-guide/string-translation/how-to-change-the-source-language-of-strings/

It would also be very helpful if you could send us the WPML debugging information.
More information here:
https://wpml.org/de/faq/provide-debug-information-faster-support/

Best regards
Andreas

November 25, 2024 at 10:17 am #16438918

martinD-95

When i open All products in WP Admin i get critical error. When i deactivate String translation plugin the problem is gone.

WPML.png
November 26, 2024 at 8:45 am #16443329

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

It seems that the minimum requirements are not met on the server:
https://wpml.org/en/home/minimum-requirements/

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.

Best regards
Andreas

November 27, 2024 at 9:36 am #16448337

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

The provided credentials are sadly not working.

Please take note, that we do not need access to your hosting platform. Simply pass us the site's login URL and admin access.

The private reply form is enabled again.

Best regards
Andreas

November 27, 2024 at 12:30 pm #16449203

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

I do need FTP access to be able to debug this further.

The private reply form is enabled again.

November 28, 2024 at 10:47 am #16454348

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

My apologies, but this FTP connection is not working. I am getting "Access denied".

Also, the wp-admin credentials for the website seem not longer to be valid.

The private reply form is enabled again.

November 29, 2024 at 3:09 am #16457423

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

I am really sorry, but either the connection to the site, neither the connect to Plesk or the connection y FTP/SFTP is working for me.

It seems as if the passwords are not correct.

Please validate and reach out again.

The private reply form is enabled again.

November 29, 2024 at 10:17 pm #16461196

Andreas W.
WPML Supporter since 12/2018

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.

November 29, 2024 at 10:22 pm #16461198

martinD-95

Thank you, you're the best!!!

November 30, 2024 at 8:14 am #16461657

martinD-95

I have another question, sorry to bother you with this.

But is it also possible to reset string translations? Or can his see if more translations have gone wrong?

Because I see several problems. For example, I need to reset sportmode and the payment solutions in wc no longer work on the checkout page

Thanks in advance.

November 30, 2024 at 2:19 pm #16461994

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

You are very welcome!