I reach over to grab my phone to check the time. I am debating whether I should stay awake and watch one more episode of The Walking Dead — it would be my fourth, maybe fifth, binge of the series.
11:12 pm.
I noticed that Slack was blowing up my phone. I had it on silent, so I had to catch up. One message stood out above all the rest:
No matching template found.
That was the front page of the Tavern last night as it updated to Gutenberg 10.5. I knew it was related to the Full Site Editing (FSE) changes in the latest release. I had seen that error enough in local testing and needed no more information to know what to do — deactivate the plugin. Then, I could get back to my internal debate of staying up for an hour past my bedtime for TV.
Sometimes, such is life on the bleeding edge, or at least life when running the fortnightly releases of the Gutenberg plugin with automatic updates enabled. It presents a challenge or two or a hundred. I had let my guard down after a smooth 10.4 release, and I knew better. After several prior releases of fixing issues on the backend, the development team gave me a break. It was almost as if they were saving up for something big.
Gutenberg now explicitly declares that anyone running the plugin is on a block-based theme, despite whether their theme actually supports block templates. It should generally fall back gracefully if there none. This seems to be centered on a change that allows classic users to create custom block templates. However, with the plugin activating a “theme-supported” feature automatically, it triggers a chain of events that overrides the template system. Any theme with a custom template hierarchy could break. I created a code snippet on Gist if anyone else runs into the issue and needs to deactivate “block templates” support.
I like that we run the plugin. Daily usage means that we can effectively write about it — a practice-what-you-preach sort of thing.
Sometimes, Gutenberg, you break my heart. You will find few enthusiastic cheerleaders more loyal than me. I believe in the project, but some days, you try your best to make it rough.
But, all is well. There are some exciting things about this release.
Template-editing mode is now enabled for classic themes. Despite this breaking the Tavern theme, it is a feature that I look forward to as a necessary transitional feature toward FSE. Another quick highlight is the work the team has done in making the Columns block more accessible. Each column now has a numbered label that is read aloud via screen-readers.
Embedded PDFs
A decade ago, I had one theme user in particular who needed to embed PDFs. As a young developer, it was just the sort of challenge I needed to build for an audience of one out of 100,000+. So, within the day, I wrapped up a solution similar to what the Gutenberg team did in version 10.5. It is nice to see WordPress finally catching up.
Only the block system makes such embedding much nicer. Drag a PDF into the content canvas and let it work its magic.
There is one caveat: many mobile phones and tablets will not show an embedded PDF. The File block does make a note of this. It also allows users to disable the inline embed and control the height.
This feature offers the best of both worlds. Visitors can read the PDF directly on the page, and they can also click the download button to snag a copy of the file.
Color Options for the Verse Block
Poets can rejoice at last The time of the Verse being a second-class block lies in the past Users can add subtle colors or those that clash A tweak here or there can give their words the flash they need to breathe to exceed, all expectations Text, background, and links are fair game Unreadable if they were all the same A splash of color is what it takes to tame the words…
I will stop there and let the pros handle actual poetry.
Gutenberg 10.2 added the standard block color options to the Verse block. Perhaps all blocks will get the same treatment down the road. I am still waiting on colors for the Quote block too.
New Block Patterns
The latest plugin update removes all 10 of the default WordPress block patterns and replaces them with 15 fresh designs. The new set is an attempt to better showcase the editor’s capabilities.
For end-users who might be worried about losing their old patterns, this will not affect your content. Because patterns are merely predefined sets of blocks, it is the blocks rather than the patterns that actually get inserted into the content canvas and saved.
The removal of old patterns with replacements of new ones was always a part of the plan. Web design changes over time, and the patterns system allows core developers to keep pace. Perhaps the old patterns will live in the upcoming block directory for those users who still want them.
Gutenberg 10.5 also introduces a few opinionated Query block patterns: Post Grid, Large Title, and Offset Posts. The ultimate goal is to provide an array of options for users as a starting point.
There is still an open call for the designers to pitch in, contributing custom Query patterns to the project. It is an opportunity to give back that requires almost no JavaScript or PHP programming knowledge.