v6 causes critical error on WP 5.8.3. site
-
Just updated the plugin and it created a critical error. When I rename the plugin folder via FTP, the site loads fine again.
-
Hi @puregraphx
Sorry to hear about that.
Would it be possible for you to attach the error log that was generated when this error had been triggered, so we can look further into the cause of this error?
Kind regards,
Jarno[11-Jan-2022 14:41:56 UTC] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /home/519488.cloudwaysapps.com/cpsetxssmu/public_html/wp-content/plugins/*complianz-gdpr/upgrade.php:279 Stack trace: #0 /home/519488.cloudwaysapps.com/cpsetxssmu/public_html/wp-includes/class-wp-hook.php(303): cmplz_check_upgrade() #1 /home/519488.cloudwaysapps.com/cpsetxssmu/public_html/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters() #2 /home/519488.cloudwaysapps.com/cpsetxssmu/public_html/wp-includes/plugin.php(470): WP_Hook->do_action() #3 /home/519488.cloudwaysapps.com/cpsetxssmu/public_html/wp-settings.php(578): do_action() #4 /home/519488.cloudwaysapps.com/cpsetxssmu/public_html/wp-config.php(76): require_once('/home/519488.cl...') #5 /home/519488.cloudwaysapps.com/cpsetxssmu/public_html/wp-load.php(50): require_once('/home/519488.cl...') #6 /home/519488.cloudwaysapps.com/cpsetxssmu/public_html/wp-admin/admin-ajax.php(22): require_once('/home/519488.cl...') #7 {main} thrown in /home/519488.cloudwaysapps.com/cpsetxssmu/public_html/wp-content/plugins/*complianz-gdpr/upgrade.php on line 279-
This reply was modified 4 years, 3 months ago by
puregraphx.
-
This reply was modified 4 years, 3 months ago by
puregraphx.
Hi @puregraphx,
Can you try this branche?
https://github.com/Really-Simple-Plugins/complianz-gdpr/compare/catch-8.1-issues?expand=1This catches the PHP 8.1 compatibly issues.
I also came across a TypeError. Is this PHP 8 related?
WordPress: 5.8.3
PHP: 8.0.13
Complianz: 6.0.0Page: https://*/wp-admin/admin.php?page=cmplz-cookiebanner&id=1
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /Users/Shared/local/*/wp-content/plugins/complianz-gdpr/class-field.php:1485 Stack trace: #0 /Users/Shared/local/*/wp-content/plugins/complianz-gdpr/class-field.php(1683): cmplz_field->border_radius(Array) #1 /Users/Shared/local/*/wp-content/plugins/complianz-gdpr/grid/grid.php(62): cmplz_field->get_fields('CMPLZ_COOKIEBAN...', 'customization') #2 /Users/Shared/local/*/wp-content/plugins/complianz-gdpr/cookiebanner/edit.php(86): cmplz_grid_container_settings('customization', Array) #3 /Users/Shared/local/*/wp-content/plugins/complianz-gdpr/cookiebanner/cookiebanner.php(221): include('/Users/Shared/l...') #4 /Users/Shared/local/*/wp-includes/class-wp-hook.php(303): cmplz_cookiebanner_overview('') #5 /Users/Shared/local/*/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters('', Array) #6 /Users/Shared/local/*/wp-includes/plugin.php(470): WP_Hook->do_action(Array) #7 /Users/Shared/local/*/wp-admin/admin.php(259): do_action('complianz-0_pag...') #8 {main} thrown in /Users/Shared/local/*/wp-content/plugins/complianz-gdpr/class-field.php on line 1485@rogierlankhorst that catch 8.1. issues fixed the error.
Out of curiosity, what caused the fatal error?Thanks for confirming!
As of PHP 8.1, retrieving the value of an array index which does not exist, or which is not an array, causes a fatal error instead of a warning (which was the case in previous versions).
The issue occurs when older versions of the cookie banner data didn’t upgrade correctly to the new array structure. This is now caught in an extra check.
Re-saving will also set the banner data to the correct structure, but this wasn’t possible due to the fatal error.
-
This reply was modified 4 years, 3 months ago by
The topic ‘v6 causes critical error on WP 5.8.3. site’ is closed to new replies.