WordPress 5.8

I have just updated this site to WordPress 5.8. My head is in my hands. WordPress has extended the use of Gutenberg blocks from the page and post editor to widgets. When you look in the customiser at your widget areas, you’re welcomed to block widgets. There’s a reassurance that all the old widgets will still work flawlessly. You are offered the opportunity to stick with the old widgets, but you need to install a plugin.

I opened the customiser to look at my widgets and got this

Will the blockification of WordPress ever end?

Block editor

Don’t get me wrong, I don’t dislike the blocks completely. They’re fine for paragraphs where you don’t want to change any formatting to anything that isn’t given in the edit bar. But to do anything even remotely different, for example to use an <i> tag (because an <em> tag isn’t appropriate for that use), you have to edit the block as HTML instead.

Every time you change the HTML directly, you risk the dreaded invalid block warning, even if your HTML is valid. Attempting block recovery will rmeove all the things it doesn’t like, something fixing the code, sometimes making more of a pig’s ear out of it. It’s best to copy the entire contents of the HTML block editor before you try to revert to visual editing, previewing the page/post or leaving the page in any other way.

The dreaded ‘unexpected or invalid content’ warning.
This image is driving me up the wall while I’m writing this post: I keep thinking there’s an invalid block

Quote blocks, which produce a <blockquote> environment under the bonnet, are a nightmare. I wanted to add a cite attribute to a blockquote, and I got this warning. I wondered if the cite attribute had become deprecated in the <blockquote> environment, so I checked the spec. for HTML5; all totally fine.

I copied and pasted my blockquote into W3’s HTML checker; it came up green and happy, with no warnings or errors found. So why won’t WordPress accept <blockquote class="wp-block-quote" cite="https://pandammonium.org/wordpress-5-8">I don't hate the blocks completely</blockquote> as a perfectly cromulent block? (It seems for each block, WordPress likes to add its own classes, which, for the Quote block is class="wp-block-quote".) Other blocks are equally frustrating in their rigidity.

W3’s Nu Html Checker validates this code, but WordPress declares the block quote code to be ‘unexpected or invalid content’.

The only solution I’ve found is to convert the block into a Custom HTML block. Even that tries to mess you about, especially when you try to use HTML entities. It’s not like the classic HTML editor, where the HTML you typed was what was rendered.

There are plenty of plugins that provide blocks for this and blocks for that, but there’s no guarantee that any of them are any better.

Block widgets

Now that I’ve accepted block widgets in WordPress 5.8, my fears are confirmed.

My Blipper Widget example page exhibits a selection of Blipper Widgets in use. They use Jetpack’s visibility settings so they’re only shown on on that page. Every other post and page show an instance of Blipper Widget set to my preferences. And yet every page I look at on my site has all of these widgets. I’m not the only who has noticed this: it’s already logged as a bug on the Jetpack plugin page.

This is not how I define working flawlessly.

Possible solutions

My choices are:

  1. revert the widgets to the classic style
  2. restore my most recent back-up (made prior to updating WordPress to 5.8)
  3. revert WordPress itself back to the previous version
  4. leave it as it is.

Option 4 is out of the question. Options 2 and 3 seem a little drastic. I tried 1: reverting the widgets.

Reverting the widgets to classic

Reverting the widgets back to the classic style involves no more than installing and activating the plugin Classic Widgets. I did this, then looked at my posts and pages. Still not right. I went to the widget settings (not using the customiser) and fixed all the visibility settings that had become unset – whether as a result of block widgets or as a result of me trying to fix the visibility of them, I don’t know. When I looked at the posts and pages again, everything was how it had been before I updated.

All is well once again. I hope WordPress doesn’t get any more bright ideas in the future about where to put blocks. I’m sure many of their users could think of a few places that aren’t bright.

Add a comment?

This site uses Akismet to reduce spam. Learn how your comment data is processed.