Widget Blocks Bugs & Issues with WordPress 5.8

Lots new under the hood of WordPress 5.8. So now the widgets work with blocks. Or should we say: widgets can now also be created, edited and managed using Gutenberg blocks. At first glance, this works really well. But then I found that widget blocks produce errors on older installations. What to do?

Everything chic with the widget blocks – or not?

I’ve been working with test installations on which the Gutenberg developer plugin is activated for a long time. Finally, I set up an installation with the WordPress release candidate. Because I just wanted to know more about what’s in store for us.

Unfortunately, I didn’t pay much attention to the widget blocks. But when I looked at it, everything looked unproblematic.

But now it was another big update day. In my case there are quite a few installations that want to be updated. And again: If I took a look at the widget blocks, there were no errors to be discovered. But then: the first problem. Right here on this blog.

Error of widget blocks: redistribution to individual sidebars

For this website I have set up two additional sidebars. In order to be able to use different widgets on the individual course pages than on the website offers and the blog.

I found these widgets redistributed after the update to WordPress 5.8. That wasn’t the end of the world. Maybe just the motivation to finally get a little more involved with the new administration of the widget blocks. Ultimately, of course, the question remains as to why the error happened: what problem do the widget blocks have with my registered sidebars?

I don’t have an answer to that yet. First of all, it was necessary to sort the misplaced widgets to their original place. And to realize that WordPress now makes titles of the second order out of the widget titles (h2). For me, the titles were all third-order headings (h3).

The widget titles: h2 or h3

Now, not all new widget blocks come with their own title. The search widget does it for example. The navigation menu widget too. If you don’t like them, you can deactivate the title when searching. You don’t need a title for the menu widget.

Of course you can also create a widget title yourself simply by using a heading block. Then he can also get the level that you want to give him. For example the h3.

However, one should group this heading with the widget that is supposed to title it. Otherwise, depending on the theme, the title and the associated widget may not end up in the same footer column!

ungrouped headers and widgets in the Twenty Nineteen footerungrouped headings (with legacy widget)Grouped headers and widgets in the Twenty Nineteen footergrouped headings

One theme where this happens, for example, is Twenty Nineteen. The tried and tested remedy against the separation of headline and content is grouping. And it works in the context of widgets as well as when working with blocks on posts or pages.

Old widgets become legacy widgets

I also noticed that WordPress 5.8 makes so-called legacy widgets out of many widgets that already existed before the update.

This is a type of block intended for third-party widgets added using the classic widgets editor. Apparently, normal WordPress widgets like the search, which date back to the time of the classic editor, are also affected. That’s fine, because legacy means legacy or inheritance.

Such a legacy widget can be converted in the same way as normal blocks: by clicking on the first toolbar button. As an alternative to the group and column, the appropriate new widget block will appear there at best. In the case of a legacy widget that shows the search, it would also say search there.

However, in the case of the search, the design of this also changes – see the example above of Twenty Nineteen.

Error: Widget blocks and old inactive widgets

Up to here everything is still good. Okay, it takes a bit of attention and getting used to working with these new widget blocks. But basically the whole thing works well.

It didn’t fare well at all when it came to inactive widgets. Two fairly old test installations in particular were affected. Over the years I had created and tried out a variety of widgets. Among them were some widgets that had been created by third parties. But most were very simple search or navigation menu widgets.

So the first invocation of the new block-based processing gave me a seemingly never-ending list of these pretty red error messages:

After updating to WordPress 5.8: Widget blocks produce errorsendless errors due to inactive widgets

The xyz block is affected by bugs and may not function properly. Please check the development tools for more details.

Gutenberg so to the errors of the widget blocks

It quickly became clear that this could actually only mean the inactive widgets (there weren’t any active ones…). So I wanted to delete them all.

There used to be a wonderful button for this. It was found below the inactive widgets and caused all of these old treasures to be deleted.

Unfortunately, with the new block management there is no such button. Or it’s so well hidden that I haven’t found it yet.

So I marked all the inactive blocks and then clicked on the More button in the toolbar (the three vertical dots) and chose Ā»Remove BlocksĀ«. The only effect: I got a new error message when trying to update, which told me about invalid parameters and requests.

Then I tried deleting each of these inactive widgets individually. Again nothing, again this error message.

Also, resolving all those legacy widgets to new search or navigation menu widgets didn’t help.

Help from the Classic Widgets plugin

The Classic Widgets plugin offers the right help in such cases. It is comparable to the still heavily used Classic Editor. But it only refers exclusively to widgets.

Installed and activated, the plugin ensures that editing looks like it used to. Which also means it’s back to the wonderful Button to delete all inactive widgets are.

Once all the old things have been deleted, the plugin no longer needs it. Then all errors caused by the widget blocks will disappear – and everything is fine. Or at least so well that things can be understood and edited.

By the way, the plugin also helps when it comes to active widgets that produce this error.

Featured images: Britta Kretschmer