Skip Navigation

[Resolved] Impossible to upgrade to php 8

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

Last updated by Minesh 1 year ago.

Assisted by: Minesh.

Author
Posts
#2677645

I am trying to:
upgrade php from 7.4 to 8.2 (or at least 8.1)
Link to a page where the issue can be seen:
hidden link

I expected to see:
a working website
Instead, I got:
PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /var/www/......./wp-content/plugins/toolset-blocks/backend/Models/ContentTemplate/UsageCondition.php:129

Please note that we rolled back to 7.4 so everything works fine. Thanks a lot for any input.

#2677660

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Can you please send me duplicator copy of your site as well as the problem URL where I can see the issue.

More info:
- 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.

#2677661

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Can you please send me duplicator copy of your site as well as the problem URL where I can see the issue.

More info:
- 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.

#2677692

Minesh
Supporter

Languages: English (English )

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

I understand that you rollback to previous PHP version.

But I would like to know what steps I will have to follow to see the issue with when I install the duplicator copy of your site on my local server?

Can you please send me duplicator copy of your site? Please follow the following doc that will help you to know how you can send us 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.

#2677715

Minesh
Supporter

Languages: English (English )

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

Can I dive into your admin panel and install the duplicator plugin and try to generate the duplicator copy of your site?

#2677716

It is already installed, give it it a shot.

#2677731

But don't duplicate it all on the server itself, you might get short of disk space.

#2677856

Minesh
Supporter

Languages: English (English )

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

In PHP 8 the issue shows up on all the pages which depend on Toolset custom fields.
==>
Can you please tell me what are those few pages where I can see the issue? Do you mean its edit custom field group page?

#2677857

Pages like hidden link or hidden link are being affected (posts #44, #5767). I don't know if our template is returning null or empty value instead of an array which is giving trouble with Toolset:
e.g. Cannot access offset of type string on string in D:\wamp\www\client-dups\5\wp-content\plugins\toolset-blocks\backend\Models\ContentTemplate\UsageCondition.php:129

#2677973

Minesh
Supporter

Languages: English (English )

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

I found that you must have a test post created and for that you have added the conditional display for the content template.

***Please make sure to backup the "wp_options" table before making any changes.***

To fix issue - you will have to interact with the database. Please try to access your database access the "wp_options " table.

***Please make sure to backup the "wp_options" table before making any changes.***
- You should search for the option key "wpv_options":
- This is the original serialize array content value stored with the option key "wpv_options" which you can find in the table "wp_options ":

 
a:11:{s:30:"support_spaces_in_meta_filters";i:0;s:35:"allow_views_wp_widgets_in_elementor";i:0;s:19:"default_user_editor";s:9:"gutenberg";s:18:"default_wpa_editor";s:9:"gutenberg";s:53:"view_taxonomy_option_loop_post_tag_option_secretariat";i:6358;s:15:"view_cpt_people";s:4:"6358";s:26:"views_template_for_contact";i:6552;s:37:"views_template_conditions_for_contact";a:0:{}s:34:"views_template_conditions_for_page";a:1:{i:0;a:5:{s:19:"content_template_id";i:7256;s:10:"conditions";a:3:{s:8:"operator";s:3:"AND";s:10:"conditions";a:1:{i:0;a:3:{s:13:"firstArgument";a:3:{s:6:"source";a:2:{s:5:"label";s:12:"Static value";s:5:"value";s:5:"value";}s:5:"value";s:10:"post_title";s:5:"extra";s:0:"";}s:8:"operator";a:2:{s:5:"label";s:1:"=";s:5:"value";s:2:"eq";}s:14:"secondArgument";a:3:{s:6:"source";a:2:{s:5:"label";s:12:"Static value";s:5:"value";s:5:"value";}s:5:"value";s:4:"test";s:5:"extra";s:0:"";}}}s:8:"negative";b:0;}s:17:"parsed_conditions";s:33:"  ( ( 'post_title' eq 'test' ) ) ";s:10:"updated_at";i:1668437509;s:8:"priority";i:0;}}s:37:"views_template_conditions_for_sponsor";a:0:{}s:26:"views_template_for_sponsor";i:10460;}

Please change the value of "wpv_options" key to the following value:

a:11:{s:30:"support_spaces_in_meta_filters";i:0;s:35:"allow_views_wp_widgets_in_elementor";i:0;s:19:"default_user_editor";s:9:"gutenberg";s:18:"default_wpa_editor";s:9:"gutenberg";s:53:"view_taxonomy_option_loop_post_tag_option_secretariat";i:6358;s:15:"view_cpt_people";s:4:"6358";s:26:"views_template_for_contact";i:6552;s:37:"views_template_conditions_for_contact";a:0:{}s:34:"views_template_conditions_for_page";a:0:{}s:37:"views_template_conditions_for_sponsor";a:0:{}s:26:"views_template_for_sponsor";i:10460;}

Please check and let me know how it goes. I hope this will help you to fix the issue.