• After initially installing the Gutenberg plugin, I was able to successfully create and edit several Gutenberg-based widget areas. But something strange happened that broke this functionality.

    When I open the Widgets page in the Dashboard, every widget area is empty; and seemingly only the widget areas created before the error appear. Even if I register a new sidebar in my functions.php file, it doesn’t appear on the Widgets page. This leads me to suspect that there may be a corrupt entry in one of those widget areas that’s keeping the rest from being loaded, but that’s just a guess.

    In the Widgets dashboard, I receive a single JS console error:

    Uncaught (in promise) TypeError: e is undefined
    index.js:1:3953

    If I add the newly-registered sidebar to a page template and edit that page with the Customizer, I see the sidebar listed in the Widgets area, and I can add a widget to it. But when the Customizer refreshes to reflect the addition, I just get some PHP errors. If I save the page, those errors appear where the sidebar should be:

    Notice: Undefined index: content in [...]/wp-content/plugins/gutenberg/lib/class-wp-widget-block.php on line 102
    
    Notice: Undefined index: content in [...]/wp-content/plugins/gutenberg/lib/class-wp-widget-block.php on line 73

    That pair of errors appears, and is repeated another 18 times.

    If I re-open the Customizer and click into that widget area, it appears empty and I’m unable to back out to the Customizer main menu (apparently JS is frozen) and I have to reload.

    Note that I can open the pre-existing sidebars and the widgets appear fine. Although I’m afraid to try editing and saving, as I don’t want them to become broken as well.

    Any ideas?

    • This topic was modified 3 years, 11 months ago by njbair.
    • This topic was modified 3 years, 11 months ago by njbair.
    • This topic was modified 3 years, 11 months ago by njbair.
    • This topic was modified 3 years, 11 months ago by njbair.
    • This topic was modified 3 years, 11 months ago by njbair.

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter njbair

    (@njbair)

    To help debug this further, I commented out every register_sidebar() call in my child theme’s functions file, except for a new one for testing. When I reloaded the Widgets page, the only section was Inactive Widgets. My test sidebar didn’t render, even though all the other sidebars were unregistered.

    I’m not sure if this is helpful info but I figure it can’t hurt to share.

    Thread Starter njbair

    (@njbair)

    Update: This definitely is related to some kind of database corruption. I was able to manually modify the value of the sidebars_widgets row in the DB wp_options table. Removing the problematic sidebar entries from the main array fixed the issue.

    Note, if you do this, you also have to change the number at the beginning of the string to reflect the new number of rows in the array. In my case, it went from 11 rows to 8 rows so I had to change a:11:{ to a:8:{.

    Not exactly beginner-level stuff, but I’m glad I got it resolved.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Widget Editor & Customizer are broken’ is closed to new replies.