Tell us what you are trying to do?
Site was recently updated to PHP8, but when loading my site in zh-hans language, i get this error:
Fatal error: Uncaught ValueError: Missing format specifier at end of string in /public_html/wp-content/plugins/types/vendor/toolset/types/embedded/includes/custom-taxonomies.php:209
Stack trace:
#0 /public_html/wp-content/plugins/types/vendor/toolset/types/embedded/includes/custom-taxonomies.php(209): sprintf('\xE6\x90\x9C\xE7\xB4\xA2 %', 'Product Categor...')
#1 /public_html/wp-content/plugins/types/vendor/toolset/types/embedded/includes/custom-taxonomies.php(68): wpcf_custom_taxonomies_register('product-cat', Array)
#2 /public_html/wp-content/plugins/types/vendor/toolset/types/embedded/functions.php(109): wpcf_custom_taxonomies_init()
#3 /public_html/wp-includes/class-wp-hook.php(307): wpcf_init_custom_types_taxonomies('')
#4 /public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
#5 /public_html/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
#6 /public_html/wp-settings.php(598): do_action('init')
#7 /public_html/wp-config.php(120): require_once('/public_html/wp-set...')
#8 /public_html/wp-load.php(50): require_once('/public_html/wp-con...')
#9 /public_html/wp-blog-header.php(13): require_once('/public_html/wp-loa...')
#10 /public_html/index.php(17): require('/public_html/wp-blo...')
#11 {main} thrown in /public_html/wp-content/plugins/types/vendor/toolset/types/embedded/includes/custom-taxonomies.php on line 209
I found that if i disabled the String Translation plugin, the error goes away. But i would like to fix this the right way and still use string translation.
Hello. Thank you for contacting the Toolset support.
I will require duplicator copy of your site to know where the problem is located.
Can you please send me duplicator copy of your site or you can setup a test site where can I access the site without any issue so you may have to setup that test site with PHP 7.x.x version.
Can you please tell me what option you would like to prefer?
ok please share test environment and share the link where the issue happens with PHP8.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
Hi, you can see the issue as soon as you change to the Chinese (zh-hans language) on the front-end country selector at the top of the page navigation. Also, im not sure on if the category slug was changed, i do not think so, but can be wrong.
Thank you! I think that worked. But can you let me know how to knew how to find that particular string that is problemactic? I think it'll help others if they know your steps in finding this issue--as this appears to only happen after upgrading to a php8 server.
Ok - it was issue with %s that replaces with % when you translate it. So I removed the %s from the string translation for those specific string of Chinese translation and I see its working.
Can you please confirm the string displays as expected. I believe the problematic string here will be used in backend.