Skip Navigation

[Resolved] Is Toolset compatible with PHP 8?

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

Problem:

Solution:
Here is the blog post we just released the PHP 8 compatible Toolset plugin version:
- https://toolset.com/2022/05/toolset-1-6-3-full-compatibility-with-php-8/

Please try to update ALL Toolset plugins to latest version either using Toolset installer or you can download it from your account's page:
=> https://toolset.com/account/downloads/

Relevant Documentation:

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 6 replies, has 2 voices.

Last updated by julieP 1 year, 10 months ago.

Assisted by: Minesh.

Author
Posts
#2370459

Switching to PHP 8 throws this error:-

PHP Deprecated: Required parameter $field follows optional parameter $post in /home/XXXXXXX/public_html/wp-content/plugins/types/vendor/toolset/types/embedded/includes/api.php on line 405

Am currently running WP 5.9.3, Types 3.4.15 and Forms 2.6.12.

Please advise.

#2370593

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

We already released the PHP 8 compatible Toolset plugin version recently and as far as I can see you could be the first person who reports this issue.

Can you please share on visiting what link it records the error you shared in the error log?

You may would like to share admin access details so I can jump it to review your setup and then I will try to reproduce it at this end.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) 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.

#2370733
php code checker.png

Being the first to report an issue, doesn't mean there isn't an issue or that it is isolated.

I don't understand your first question. The only url recorded in debug.log is the one to the Toolset file.

The site is locked down so access isn't possible.

I've run the function code at line 405 in file api.php through a code checker and that also returns an error (see attached image).

It's my understanding that parameters without a default value now need to be BEFORE optional parameters. If I swap the parameters over in the checker and run it again, it doesn't return any errors. If I do the same thing to the file in my website, I can run PHP 8 and not get the original error. Also, if you look at the other functions in that file, they DO follow the required order for the parameters. It's only the function at line 405 that doesn't.

#2370749

Minesh
Supporter

Languages: English (English )

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

Can you tell me what tool you are using to check the PHP code?

#2370757

hidden link

I've now tried to implement PHP 8 on another site and that's throwing up the same error for a different file :-
/wp-content/plugins/types/vendor/toolset/types/includes/classes/class.wpcf.roles.php on line 274

Again, if I swap the parameters over, the issue goes away.

Please also take a look at this:-

hidden link

#2370803

Minesh
Supporter

Languages: English (English )

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

Ok - Here is the blog post we just released the PHP 8 compatible Toolset plugin version:
- https://toolset.com/2022/05/toolset-1-6-3-full-compatibility-with-php-8/

Please try to update ALL Toolset plugins to latest version either using Toolset installer or you can download it from your account's page:
=> https://toolset.com/account/downloads/

It should be fixed.

#2371479

Hadn't received notification to update plugins.

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