• Resolved gyakuzuki

    (@gyakuzuki)


    I recently updated my blog after probably about a year, and shortly afterwards I had an issue happening with my widgets. I had lots of old style widgets rather than the new ‘blocks’ and Jetpack started throwing errors trying to render them.

    I removed all the widgets from my widget area and deactivated some of the Jetpack social widgets.

    However, now, regardless of what theme I have set, when I try to ‘customise’ a theme I get a ‘critical error’, and the widgets page in settings says my theme has ‘no widget areas’.

    I enabled debug and get the following:
    [03-Aug-2021 02:28:57 UTC] PHP Fatal error: Uncaught Error: Cannot unset string offsets in /home/y02zuki/public_html/blog/wp-includes/class-wp-customize-widgets.php:1216
    Stack trace:
    #0 /home/y02zuki/public_html/blog/wp-includes/class-wp-hook.php(303): WP_Customize_Widgets->preview_sidebars_widgets(”)
    #1 /home/y02zuki/public_html/blog/wp-includes/plugin.php(189): WP_Hook->apply_filters(”, Array)
    #2 /home/y02zuki/public_html/blog/wp-includes/widgets.php(1035): apply_filters(‘sidebars_widget…’, ”)
    #3 /home/y02zuki/public_html/blog/wp-includes/class-wp-customize-widgets.php(379): wp_get_sidebars_widgets()
    #4 /home/y02zuki/public_html/blog/wp-includes/class-wp-customize-widgets.php(354): WP_Customize_Widgets->customize_register()
    #5 /home/y02zuki/public_html/blog/wp-includes/class-wp-hook.php(303): WP_Customize_Widgets->schedule_customize_register(Object(WP_Customize_Manager))
    #6 /home/y02zuki/public_html/blog/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(”, Array)
    #7 /home/y02zuki/public_html/blog/wp-includes/plugin.php(470): WP_Hook in /home/y02zuki/public_html/blog/wp-includes/class-wp-customize-widgets.php on line 1216

    I’ve tried reinstalling the current WordPress version, I’ve tried different themes, tried enabling or disabling plugins and Jetpack modules, but nothing has helped.

    Can someone help me out with this?

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator t-p

    (@t-p)

    I recently updated my blog after probably about a year

    Are you saying you update WP to the latest version 5.8 ?

    If so, Please review 5.8 Master List and attempt troubleshooting outlined therein.

    Thread Starter gyakuzuki

    (@gyakuzuki)

    Sure, I’ll try these, but the issue didn’t happen right away when I upgraded. As I mentioned, things were fine, then Jetpack started being weird with widgets, then widgets and customise became broken.

    I will reply again once I’m through the list; note that I won’t try the ‘permalink structure’ one because I already tried and it causes a separate issue with htaccess that I have a separate post about.

    Thread Starter gyakuzuki

    (@gyakuzuki)

    Ok, I tried all of that and still no help. Can anyone help me with what’s gone wrong? Something must be persisting somewhere to cause this, surely? Since I’ve gone through a reinstall and everything? Is this something database related?

    Thread Starter gyakuzuki

    (@gyakuzuki)

    OK, I resolved this by adding a junk array from a “theme_mods_***” option in the database to the “sidebars_widgets” option, which was for some reason totally blank and this seemed to be what the debug logs were indicating.

    gyakuzuki, I certainly wish you had been more specific with your solution – I am desperate to solve this and move on. What does ‘adding a junk array from a “theme_mods_***’ option, etc., mean ? Steps? Thanks!

    Thread Starter gyakuzuki

    (@gyakuzuki)

    Excuse me? I certainly wish you had some manners when asking someone for help. This was months and months ago, I’m not going to able to provide you a step by step solution here.

    The debug logs, from my memory, indicate that one of the entries in the database is broken. In my case, it was entirely null, when it should have had some array of content. Repairing the content wasn’t necessary, if I could get past the null error, I could just reinstall the theme to repopulate the database correctly. In my case, I believe I added an empty array {} into the null field, which, whilst obviously not fixing the theme, left it at least in a state that could be repaired by a removal and reinstall of the theme.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Critical error when I try to ‘customise’ regardless of theme’ is closed to new replies.