Skip Navigation

[Resolved] Migration website from PHP 7.4 to 8.1

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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 4 replies, has 2 voices.

Last updated by Minesh 10 months, 3 weeks ago.

Assisted by: Minesh.

Author
Posts
#2685148

Tell us what you are trying to do?

our Website is running actually with PHP 7.4, but our provider will not maintain anymore this old version. We have to migrate until april to version 8.1. I tried to run the website with version 8.1, this caused a white screen on frontend and backend.

I then deactivated all plugins, with this setting, login and frontend display was possible again. I then activated one plugin after the other in order to find the one(s), which is/are the reason for the failure. As a result, I had to delete one other plugin. All Toolset Plugins were ok, with the exeption of 'Types'. If types is active, and I switch to PHP 8.1, then the following error message is displayed:

Fatal error: Uncaught ValueError: Missing format specifier at end of string in /home/franzgas/www/rechtskonform.ch/wp-content/plugins/types inakt/vendor/toolset/types/embedded/includes/custom-taxonomies.php:209 Stack trace: #0 /home/franzgas/www/rechtskonform.ch/wp-content/plugins/types inakt/vendor/toolset/types/embedded/includes/custom-taxonomies.php(209): sprintf('F\xC3\xBCge hinzu ode...', 'Aenderungskateg...') #1 /home/franzgas/www/rechtskonform.ch/wp-content/plugins/types inakt/vendor/toolset/types/embedded/includes/custom-taxonomies.php(68): wpcf_custom_taxonomies_register('aenderungskateg...', Array) #2 /home/franzgas/www/rechtskonform.ch/wp-content/plugins/types inakt/vendor/toolset/types/embedded/functions.php(109): wpcf_custom_taxonomies_init() #3 /home/franzgas/www/rechtskonform.ch/wp-includes/class-wp-hook.php(324): wpcf_init_custom_types_taxonomies('') #4 /home/franzgas/www/rechtskonform.ch/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #5 /home/franzgas/www/rechtskonform.ch/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #6 /home/franzgas/www/rechtskonform.ch/wp-settings.php(643): do_action('init') #7 /home/franzgas/www/rechtskonform.ch/wp-config.php(114): require_once('/home/franzgas/...') #8 /home/franzgas/www/rechtskonform.ch/wp-load.php(50): require_once('/home/franzgas/...') #9 /home/franzgas/www/rechtskonform.ch/wp-blog-header.php(13): require_once('/home/franzgas/...') #10 /home/franzgas/www/rechtskonform.ch/index.php(17): require('/home/franzgas/...') #11 {main} thrown in /home/franzgas/www/rechtskonform.ch/wp-content/plugins/types inakt/vendor/toolset/types/embedded/includes/custom-taxonomies.php on line 209

At this state, the front end cannot displayed and login at backend is not possible.

I looked also at the taxonomy 'Aenderungskategorie' (see error message), but found nothing which could be wrong. I saved the taxonomy in the 'Edit screen' based on the following support thread

https://toolset.com/forums/topic/an-error-occurred-when-we-upgraded-the-php-version-from-7-4-to-8-1/

but this did not help. I switched serveral times from PHP 7.4 to 8.1 in order to find the cause of problems, with the result, that in the upper part of the window, the following error message appears now in the backend and frontend (even with PHP 7.4):

Warning: sprintf() [function.sprintf.php]: Too few arguments in /home/franzgas/www/rechtskonform.ch/wp-content/plugins/types/vendor/toolset/types/embedded/includes/custom-taxonomies.php on line 209.

I also tried to re-install Toolset Types, but with no effect on the compatibility problem of the plugin.

Is there any documentation that you are following?
I looked at the specifications of Toolset, the following settings are enabled by our provider

The eval() PHP function must be enabled. More about this in the section about eval().
Multibyte String extension (mbstring) must be enabled.

Is there a similar example that we can see?

What is the link to your site?
hidden link

#2685189

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Can you please try to setup the site with PHP 7.4.x and send me admin access details and I will review whats going wrong with your setup or you can send me duplicator copy of your site and I will setup your site on my local server that will allow me to investigate the issue further.

Can you please confirm what option you would like to go with?

Here is the information how you can send me duplicator copy of your site:
- https://toolset.com/faq/provide-supporters-copy-site/

I have set the next reply to private which means only you and I have access to it.

#2685249

Minesh
Supporter

Languages: English (English )

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

As you can see with any other taxonomy edit page:
- hidden link

You will notice that the %s is assigned properly with all the labels where applicable.

But with "Aenderungskategorien" taxonomy - I found that the %s is not assigned properly to all the labels where required:
- hidden link

I've changed the following lables:
- Neues Element hinzufügen FROM Füge % hinzu TO Füge %s hinzu
- Hinzufügen oder entfernen FROM Füge % hinzu oder entferne % TO Füge %s hinzu oder entferne %s
- Menüname FROM Aenderungsbemerkungen TO %s

And I save the taxonomy Aenderungskategorien.

Can you please try to switch to PHP 8.1 now and check if this help you to resolve your issue.

If you see the same for other taxonomy or post type try to make sure the %s is properly added for labels.

#2685453

Hi Minesh,
many thanks for your reply, this was exactly causing the troubles. I switched to PHP 8.1, and most of the problems were solved. I had to treat some other minor compatibility problems, which I was able to handle myself. Would it be possible to keep open this ticket for some days to give me time to further test the website?

When looking at the website with PHP 8.1 and with debugging option showing remarks in the display, I found a lot of remarks concerning 'depreciated functions' in types or Toolset respectively. Is that normal and it is necessary to optimize something?

Kind regards

Franz

#2685463

Minesh
Supporter

Languages: English (English )

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

Glad to know that your original issue is resolved.

You're welcome to file new ticket with every new question you may have. This will help other users searching on the forum as well as help us to write resolution summery for the original issue reported with this ticket.

#2685476

Many thanks for your valuable support!!