-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Block categories: Inconsistent legacy mappings #23118
Comments
The original PR's description does list Text as the destination for Formatting. I guess we should patch the PHP rules, then, and do it quickly so that no mistakes are carried over in the 5.5 PHP backporting process in #23210. |
There is no mapping in WordPress core. It’s a simple act of replacing categories 😃 |
Looking at https://github.com/WordPress/wordpress-develop/blob/24465974cd6333137490b55ab663f3d1f844a95e/src/wp-admin/includes/post.php#L2180-L2210, category Design still needs to be added. |
Design is already there in WordPress core: I examined code and I think everything looks good. The confusion comes from the fact that the compat layer in PHP only updates the list of default categories and JS does the mapping. |
Never mind, I don't know how I missed that. 😓 |
Describe the bug
When reviewing changes from #19279, I noticed that the compatibility mappings for legacy block categories appear to have inconsistent mappings in PHP and JavaScript. In PHP
formatting
is mapped tomedia
, whereas in JavaScript it's mapped totext
:gutenberg/lib/compat.php
Lines 339 to 355 in 84df4bd
gutenberg/packages/blocks/src/api/registration.js
Lines 131 to 135 in 84df4bd
I'm not sure how this bug manifests, but I'd expect these mappings to be consistent.
CC: @mtias
The text was updated successfully, but these errors were encountered: