Skip Navigation

[Resolved] Repeated PHP Notice from WooCommerce Views after updating to PHP 7.4

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

Problem:

Get some PHP errors and notice when use "Toolset WooCommerce Blocks" plugin.

Solution:

Please try these in your website:

1) Backup your website database,

2) Delete and reinstall the Toolset WooCommerce Blocks plugin, you can download it here:
https://toolset.com/account/downloads/

3) Dashboard-> Toolset-> Woocommerce Views:
Choose the options you want, then "Save all Settings", and test again.
It should be able reset all "Toolset WooCommerce Blocks" plugin settings, and resolve the PHP notice problem.

Relevant Documentation:

This support ticket is created 3 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 2 voices.

Last updated by jonB-5 3 years, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#1723035

Within minutes of updating to PHP7.4 the following PHP notice appeared in my error log multiple times (possibly over 100):

[30-Jul-2020 15:04:07 UTC] PHP Notice:  Trying to access array offset on value of type bool in /home/tsnetwork/public_html/wp-content/plugins/woocommerce-views/Class_WooCommerce_Views.php on line 1746

This also appeared:

[30-Jul-2020 15:17:52 UTC] PHP Warning:  strpos(): Empty needle in /home/tsnetwork/public_html/wp-includes/plugin.php on line 687
[30-Jul-2020 15:17:53 UTC] PHP Notice:  Trying to access array offset on value of type bool in /home/tsnetwork/public_html/wp-content/plugins/woocommerce-views/Class_WooCommerce_Views.php on line 1745
[30-Jul-2020 15:17:53 UTC] PHP Notice:  Trying to access array offset on value of type bool in /home/tsnetwork/public_html/wp-content/plugins/woocommerce-views/Class_WooCommerce_Views.php on line 1746
[30-Jul-2020 15:17:53 UTC] PHP Warning:  strpos(): Empty needle in /home/tsnetwork/public_html/wp-includes/plugin.php on line 687
[30-Jul-2020 15:17:53 UTC] PHP Warning:  require(/home/tsnetwork/public_html/wp-content/plugins/woocommerce-views/inc/wcviews-blocks.php): failed to open stream: No such file or directory in /home/tsnetwork/public_html/wp-content/plugins/woocommerce-views/views-woocommerce.php on line 93
[30-Jul-2020 15:17:53 UTC] PHP Fatal error:  require(): Failed opening required '/home/tsnetwork/public_html/wp-content/plugins/woocommerce-views/inc/wcviews-blocks.php' (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/tsnetwork/public_html/wp-content/plugins/woocommerce-views/views-woocommerce.php on line 93
[30-Jul-2020 15:17:53 UTC] PHP Notice:  Trying to access array offset on value of type bool in /home/tsnetwork/public_html/wp-includes/class-wp-recovery-mode-email-service.php on line 339
[30-Jul-2020 15:17:53 UTC] PHP Notice:  Trying to access array offset on value of type bool in /home/tsnetwork/public_html/wp-includes/class-wp-recovery-mode-email-service.php on line 340
[30-Jul-2020 15:17:53 UTC] PHP Warning:  strpos(): Empty needle in /home/tsnetwork/public_html/wp-includes/plugin.php on line 687

I have not yet had time to see if this has any noticeable impact on functionality.

Please can you let me know if this is cause to downgrade my PHP version?

I have had to deactivate WooCommerce Views and return to PHP7.2 to prevent this slowing my site while it is fixed. Please let me know if you require access to debug so that I can reactivate the Plugin and PHP 7.4 when you need.

#1723047

Site speed has stabilised so I have returned to PHP 7.4, though I still get the following error many many times:

[30-Jul-2020 15:04:07 UTC] PHP Notice:  Trying to access array offset on value of type bool in /home/tsnetwork/public_html/wp-content/plugins/woocommerce-views/Class_WooCommerce_Views.php on line 1746
#1723477

Hello,

The problem you mentioned above is abnormal, please check these:
1) Make sure you are using the latest version of Toolset plugins, you can download them here:
https://toolset.com/account/downloads/

2) In case it is a compatibility problem, please deactivate all other plugins, and switch to wordpress default theme 2020, deactivate all custom codes, and test again

3) Also check if there is any PHP/JS error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/

4) If the problem still persists, please provide database dump file(ZIP file) of your website, you can put the package files in your own google drive disk, share the link only, also point out the problem page URL and view URL, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#1723613

Thanks for the details, I can install your database dump file in my localhost.

In the debug logs you provided above, there is a PHP error:

[30-Jul-2020 15:17:53 UTC] PHP Fatal error: require(): Failed opening required '/home/tsnetwork/public_html/wp-content/plugins/woocommerce-views/inc/wcviews-blocks.php' (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/tsnetwork/public_html/wp-content/plugins/woocommerce-views/views-woocommerce.php on line 93

That means the "Toolset WooCommerce Blocks" plugin file is broken in your website.

Please try these in your website:
1) Backup your website database,

2) Delete and reinstall the Toolset WooCommerce Blocks plugin, you can download it here:
https://toolset.com/account/downloads/

3) Dashboard-> Toolset-> Woocommerce Views:
Choose the options you want, then "Save all Settings", and test again.
It should be able reset all "Toolset WooCommerce Blocks" plugin settings, and resolve the PHP notice problem.

It works fine in my localhost.

#1723633

Hi Luo,

That's fixed this issue and another with the same plugin that I had been experiencing.

Thank You for your help!

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