Closed andrewserong closed 2 years ago
CC: @kjellr, too. I don't have access to add reviewers or labels to this repo 🙂
Since the theme has not been updated since June I would expect there to be a large amount of compatibility issues. I don't think anyone frankly has time to update the theme until after we are all rested after 5.9.
Since Twenty Twenty-Two will be the new theme that is tested with Gutenberg, can we prioritize making that change instead?
While I can merge it, I don't know how to tag it as a new release, and I can't release it to .org.
Thanks for merging @carolinan! And good to know that it's expected there'll be issues with TT1-Blocks until 11.9 comes out. I'll keep that in mind and focus more of my testing on TwentyTwentyTwo instead. Cheers!
As an aside, I just took a quick look at the TT2 templates and it looks like they don't have the same issue (the layout
attribute in those templates appears to be set correctly) 👍
With change, I meant, make sure that Gutenberg uses TT2 not tt1-blocks :) https://github.com/WordPress/twentytwentytwo/issues/133
Just to double-check before we do any further work in Gutenberg, @jorgefilipecosta it looks like this markup was last updated in #276 — do you remember if the updated markup was copy + pasted or hand-edited?
Hi @andrewserong, I'm sorry for the delay. The update was a mix of copy + paste and manual updates to reduce the diff.
Perfect, thanks for confirming @jorgefilipecosta, just wanted to make sure I didn't need to investigate the block itself further in the Gutenberg repo, and that confirms it. Cheers! 🙇
On a fresh install of Gutenberg, running in
wp-env
, I noticed that the currentindex.html
template throws an error, due to thelayout
attribute being set to an invalid value (list
):This then throws an error in
useAvailableAlignments
at this lineThis is because the
layout
attribute in this markup should bedisplayLayout
, aslayout
is reserved for the Layout block support. The switch todisplayLayout
was introduced in https://github.com/WordPress/gutenberg/pull/31833 (back in May).It seems that this error occurs because for the current markup the
layout
attribute is being used directly in the Query block here — and because the current markup includes the containerdiv
, it never gets migrated via a deprecation (which usually handles the migration fromlayout
todisplayLayout
).Just to double-check before we do any further work in Gutenberg, @jorgefilipecosta it looks like this markup was last updated in https://github.com/WordPress/theme-experiments/pull/276 — do you remember if the updated markup was copy + pasted or hand-edited? Just trying to work out whether the markup here had a typo, or if we need additional deprecations in Gutenberg to handle this case?
Steps to test
With Gutenberg activated, go to create a new page and copy and paste the existing markup for the
wp:query
block from this file into the code editor view. You should see the error message in the screenshot above when you switch back to the visual editor.Edit the markup in the code editor view and copy paste the change in this PR over the existing markup. When you switch back to the visual editor view, there should no longer be an error. Or, alternately, spin up a new WP instance and use this PR to load the TT1-Blocks theme. When you open the site editor, there should be no errors in the Query block.