Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 6 replies, has 3 voices.

Last updated by Long Nguyen 1 year, 3 months ago.

Assisted by: Long Nguyen.

Author Posts
August 15, 2023 at 6:50 pm #14204997

francescoS-56

I am trying to: Activate WPML Plugin

Link to a page where the issue can be seen: hidden link

I expected to see: a normal website performance

Instead, I got: Uncaught ValueError: Missing format specifier at end of string

I recently migrated from an aws server with wordpress and php7.4 to an aws bitnami server with php 8.1, the entire migration was successful because it was done with all plugins disabled.

But when I turn on all the plugins everything works perfectly except until WPML is activated and my website gives a critical error showing the message that was attached in the screenshot.

It should be noted that my environment uses buddyboss as a theme, it is also complemented by the learndash LMS plugin, which if you look at the error is generated in one of the learndash LMS files, however it is caused due to translation files that I assume are generated by WPML.

I previously contacted learndash support and they have full compatibility with php 8.1 and it is also noteworthy that the error does not occur while WPML is turned off nor does it happen with both turned on but using php 7.4, so I come to you to help me find one fixes this problem.

error wpml.PNG
August 16, 2023 at 1:11 pm #14236015

Sumit
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi,

Thank you for contacting the support forum.
Before your ticket is assigned to one of my colleagues, please allow me to walk you through some initial debugging steps. This will help speed up the support process.

From the local copy of the plugin, I see, the string in question is "%s Points". Please search this string in String Translation and make sure %s has the same format in translated strings.

if you are not sure, please post a screenshot of the search result from String Translation with translated strings.

Also, note:- sometimes it happens due to supplied translated MO files from the plugin author. The string translation is coming from the MO file and it is wrong. In that case, disable the WPML and change the default language of the site in WordPress same as the WPML default language and check if you see the error.

Thanks

August 17, 2023 at 2:04 pm #14246855

francescoS-56

Regards,

Thank you for your answer, however i must be honest and express my concern regarding your plugin, because if I am understanding correctly you are telling me that the error for not finding a translation string is generating a critical error, which means that I cannot access my page, not even the wordpress administration, does that seem normal to you?

Which makes me think that every time wpml doesn't find a translation string associated with any plugin, I'm going to run the risk of my site crashing and I can't access it?

........

To be able to access again I deactivated the wpml plugin, and learndash, then I activated the wpml plugin, but keeping the learndash lms plugin deactivated and the site did not generate 500 error, which shows that there is a compatibility problem with the learndash lms plugin.

I will attach images of the exact search for the translation string that you indicated and I will also send you the wpml debbug report but take into account that all the plugins associated with learndash are turned off as I mentioned before.

wpml string.PNG
August 18, 2023 at 4:24 am #14249369

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi Francesco,

Thank you for contacting WPML support, I'd be happy to help you with this issue.

if I am understanding correctly you are telling me that the error for not finding a translation string is generating a critical error

No, that's not the issue. WPML won't throw a critical error if a string is not translated. The error happens when you translate it in the wrong format.
For example: the string in this case "%s Points", should be translated into the Spanish language like this "%s Puntos". But if you add the translation string "% Puntos" (missing "s"), it will throw an error.

Please read more about translating placeholders in the WordPress documentation hidden link

Regarding the debug information, please follow the documentation below to share it.
https://wpml.org/faq/provide-debug-information-faster-support/

Look forward to your reply.
Thanks

August 18, 2023 at 1:42 pm #14252779

francescoS-56

ok I understand, but I checked the code and it is well written, that is, it is as '%s Points', I will attach a screenshot of the code so you can see it, additionally I will add the debugging information.

bitnami wpml 1.PNG
August 18, 2023 at 1:52 pm #14252859

francescoS-56

I attach another image where you can see exactly the line

bitnami wpml 2.PNG
August 20, 2023 at 3:22 pm #14258773

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

According to your screenshot above https://wpml.org/wp-content/uploads/2023/08/14246855-wpml_string_4.png
Please find the string "%s Points" in WPML > String Translation > Click on the pen button and see what translated string is and correct it.

If it does not help, I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to have a testing site where the issue is replicated. Your next reply is set to private to share the info.

❌ IMPORTANT: Please backup your database and website before proceeding ❌
You can use this plugin to create the backup:
https://wordpress.org/plugins/duplicator/
✙ I would need your permission to de-activate and re-activate Plugins and the Theme to change configurations on the site if needed. This is also a reason the backup is critical.

Look forward to your reply.
Thanks

The topic ‘[Closed] Uncaught ValueError: Missing format specifier at end of string’ is closed to new replies.