Opened 3 years ago
Closed 3 weeks ago
#55410 closed enhancement (worksforme)
Update spacer block markup in patterns/templates registered by Twenty Twenty-Two and Core
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | 6.0 |
Component: | Bundled Theme | Keywords: | has-patch |
Focuses: | Cc: |
Description
The Twenty Twenty-Two theme registers block patterns and templates that contain deprecated markup for core/spacer blocks. They specify height attribute as a number ("height":50) instead of a string that includes units ("height":"50px"). Because of that, the block parser reports depreciation messages in browser console.
The attached patch updates markup of block patterns and templates registered by modules that don't need to be compatible with pre-5.9 WordPress: the Twenty Twenty-Two theme and Core itself.
Change History (5)
This ticket was mentioned in PR #2422 on WordPress/wordpress-develop by jsnajdr.
3 years ago
#1
#2
@
12 months ago
- Keywords needs-testing added
- Milestone changed from Awaiting Review to Future Release
#3
@
10 months ago
- Owner set to karmatosed
- Status changed from new to assigned
Assigning to myself for testing, thank you.
#5
@
3 weeks ago
- Keywords needs-testing removed
- Resolution set to worksforme
- Status changed from assigned to closed
Reproduction Report
Description
❌ This report can't validate that the issue can be reproduced.
Environment
- WordPress: 6.9-alpha-60093-src
- PHP: 8.2.28
- Server: nginx/1.27.5
- Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
- Browser: Chrome 136.0.0.0
- OS: Windows 10/11
- Theme: Twenty Twenty-Two 2.0
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.0
Bug Reproduction Steps
- Enable 2022 theme
- Open a new page
- Add a template > Footers > Footer with social links and copyright
- ❌ Nothing happens
Actual Results
- ❌ Error condition doesn't occur
Additional Notes
Hello @jsnajdr, I've noted that if I add a spacer and remove the px
in code, the deprecation notice appears as you suggest.
But I've been trying to add several patterns and I can't seem to find one that triggers this notice
I've checked your PR and added some templates (without the patch) that you seem to be touching like footer-navigation-coypright.php
and none seem to trigger the deprecation notice
For example, one of the templates you touch is "footer with social links and copyright" but the pixels are automatically added
Maybe since 3 years have passed since you opened this, this has been already sorted at some point
This said, I can close this as worksforme
. You are welcome to reopen if you can provide some exact reproduction steps that I could have missed.
The Twenty Twenty-Two theme registers block patterns and templates that contain deprecated markup for
core/spacer
blocks. They specifyheight
attribute as a number ("height":50
) instead of a string that includes units ("height":"50px"
). Because of that, the block parser reports a lot of depreciations in browser console, like:The spacer format change was introduced in this PR: https://github.com/WordPress/gutenberg/pull/36186
I'm also updating the
core/query-offset-posts
pattern registered by Core itself, not by a theme. And one instance ofcore/cover
block which also had deprecated markup.I'm updating only code that doesn't support WordPress versions older than 5.9, i.e., Core and the Twenty Twenty-Two theme. Other themes, like Twenty Thirteen, also register patterns with deprecated markup, but these also support older versions of WordPress, which wouldn't be able to parse the new format.
Fixes https://core.trac.wordpress.org/ticket/55410