Skip Navigation

[Resolved] Issue with Toolset when upgrading from PHP 7.4 to 8.0

This thread is resolved. Here is a description of the problem and solution.

Problem:

I get the critical error below in PHP 8:

Fatal error: Uncaught ValueError: Missing format specifier at end of string
...

Solution:

In one of the taxonomies that was created with Toolset the "All Items" value missed "s" character.

Instead of "items %" it should be "items %s".

In PHP you need to have %s instead of the strings not %.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

This topic contains 7 replies, has 2 voices.

Last updated by volodiaB 1 year, 5 months ago.

Assisted by: Christopher Amirian.

Author
Posts
#2484653

I am trying to: upgrade from PHP 7.4 (expiring soon in the host: one.com) to 8.0.

Link to a page where the issue can be seen: none. I downgraded back to 7.4 on the PROD env.

I expected to see: no error.

Instead, I got: website down and following error message
Fatal error: Uncaught ValueError: Missing format specifier at end of string in /customers/3/9/8/magicvelos.be/httpd.www/wp-content/plugins/types/vendor/toolset/types/embedded/includes/custom-taxonomies.php:209 Stack trace: #0 /customers/3/9/8/magicvelos.be/httpd.www/wp-content/plugins/types/vendor/toolset/types/embedded/includes/custom-taxonomies.php(209): sprintf('Tous les %', 'Types de v\xC3\xA9los...') #1 /customers/3/9/8/magicvelos.be/httpd.www/wp-content/plugins/types/vendor/toolset/types/embedded/includes/custom-taxonomies.php(68): wpcf_custom_taxonomies_register('type-velos-neuf...', Array) #2 /customers/3/9/8/magicvelos.be/httpd.www/wp-content/plugins/types/vendor/toolset/types/embedded/functions.php(109): wpcf_custom_taxonomies_init() #3 /customers/3/9/8/magicvelos.be/httpd.www/wp-includes/class-wp-hook.php(307): wpcf_init_custom_types_taxonomies('') #4 /customers/3/9/8/magicvelos.be/httpd.www/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array) #5 /customers/3/9/8/magicvelos.be/httpd.www/wp-includes/plugin.php(476): WP_Hook->do_action(Array) #6 /customers/3/9/8/magicvelos.be/httpd.www/wp-settings.php(598): do_action('init') #7 /customers/3/9/8/magicvelos.be/httpd.www/wp-config.php(91): require_once('/customers/3/9/...') #8 /customers/3/9/8/magicvelos.be/httpd.www/wp-load.php(50): require_once('/customers/3/9/...') #9 /customers/3/9/8/magicvelos.be/httpd.www/wp-blog-header.php(13): require_once('/customers/3/9/...') #10 /customers/3/9/8/magicvelos.be/httpd.www/index.php(17): require('/customers/3/9/...') #11 {main} thrown in /customers/3/9/8/magicvelos.be/httpd.www/wp-content/plugins/types/vendor/toolset/types/embedded/includes/custom-taxonomies.php on line 209

#2485937

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

The version that you use is supposed to support PHP version 8.

Let's start with basic troubleshooting to see if the sprintf error that is thrown, is a conflict or a native one.

- IMPORTANT STEP! Create a backup of your website.
- Switch to the default theme such as "TwentyTwenty" by going to "WordPress Dashboard > Appearance > themes".
- Go to "WordPress Dashboard > Plugins" and deactivate all plugins except Toolset and its add-ons.
- Check if you can still recreate the issue.
- If not, re-activate your plugins one by one and check the issue each time to find out the plugin that causes the problem.

You'd better do it on a staging version of your website.

Thank you.

#2489375

Hi Christopher,

Many thanks for the reply.

Before I try the troubleshooting, I'd like to upgrade to Toolset 3.4.17 (which apparently brings bug fixes). However, this new version is not proposed in my WP updates.

Any advices on how to push the upgrade?

Also, will upgrade to WP 6.1 be of any help?

Best, Volodia

#2489421

Update - I upgraded to Toolset Types 3.4.17 and WordPress 6.1 and get the following error message when trying to upgrade PHP to version 8.0 (it looks very similar to the initial error, besides some changes of lines in the code of 'class-wp-hook.php'):

Fatal error: Uncaught ValueError: Missing format specifier at end of string in /customers/3/9/8/magicvelos.be/httpd.www/wp-content/plugins/types/vendor/toolset/types/embedded/includes/custom-taxonomies.php:209 Stack trace: #0 /customers/3/9/8/magicvelos.be/httpd.www/wp-content/plugins/types/vendor/toolset/types/embedded/includes/custom-taxonomies.php(209): sprintf('Tous les %', 'Types de v\xC3\xA9los...') #1 /customers/3/9/8/magicvelos.be/httpd.www/wp-content/plugins/types/vendor/toolset/types/embedded/includes/custom-taxonomies.php(68): wpcf_custom_taxonomies_register('type-velos-neuf...', Array) #2 /customers/3/9/8/magicvelos.be/httpd.www/wp-content/plugins/types/vendor/toolset/types/embedded/functions.php(109): wpcf_custom_taxonomies_init() #3 /customers/3/9/8/magicvelos.be/httpd.www/wp-includes/class-wp-hook.php(308): wpcf_init_custom_types_taxonomies('') #4 /customers/3/9/8/magicvelos.be/httpd.www/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #5 /customers/3/9/8/magicvelos.be/httpd.www/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #6 /customers/3/9/8/magicvelos.be/httpd.www/wp-settings.php(617): do_action('init') #7 /customers/3/9/8/magicvelos.be/httpd.www/wp-config.php(91): require_once('/customers/3/9/...') #8 /customers/3/9/8/magicvelos.be/httpd.www/wp-load.php(50): require_once('/customers/3/9/...') #9 /customers/3/9/8/magicvelos.be/httpd.www/wp-blog-header.php(13): require_once('/customers/3/9/...') #10 /customers/3/9/8/magicvelos.be/httpd.www/index.php(17): require('/customers/3/9/...') #11 {main} thrown in /customers/3/9/8/magicvelos.be/httpd.www/wp-content/plugins/types/vendor/toolset/types/embedded/includes/custom-taxonomies.php on line 209

#2489957

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

Thank you for the details.

Would you please create a staging version of the website and get back to us with the login information?

We will create an All In One Migration package out of the website and try to copy the website to our server to test.

please make sure you set the next reply as private.

Thank you.

#2492173

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

I copied the website on my local installation and the same issue happened there.

I escalated this to the second tier support.

I will get back to you as soon as I have an update.

Thank you.

#2497433

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

We have an answer from the second tier.

The issue that you have is with the custom taxonomies below:

"Marques de vélos neufs" and "Types de vélos neufs"

and within the labels section "All Items" value you have to set as: Tous les %s instead of Tous les % (which is the current value)

In PHP you need to have %s instead of the strings not %.

Thank you.

#2497499

Many thanks for the support Christopher. The issue is now fixed!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.