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.
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.
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.
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
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.
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.