Skip to content
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

Fix editor crash when registering a block pattern without categories #27970

Merged
merged 1 commit into from
Jan 4, 2021

Conversation

ntsekouras
Copy link
Contributor

Description

Fixes: #27249

This PR fixes the crash when registering a block pattern without categories.

Testing instructions

  1. Register a block pattern without categories
register_block_pattern(
	'test/test-case-block-pattern',
	array(
		'title'       => __( 'a simple heading', 'what should this be' ),
		'description' => _x( 'mmm..cake', ' this is slang and has more nuance in english', ''),
		'content'     => '<!-- wp:heading --><h2>The history of cake</h2><!-- /wp:heading -->',
	)
);
  1. In a post/page open the Inseter and go to Patterns tab.
  2. Observe that the editor doesn't crash and works as expected.

@ntsekouras ntsekouras added [Type] Bug An existing feature does not function as intended [Feature] Inserter The main way to insert blocks using the + button in the editing interface labels Jan 4, 2021
@ntsekouras ntsekouras self-assigned this Jan 4, 2021
@ntsekouras ntsekouras added this to Needs Review in WordPress 5.7 Must Haves via automation Jan 4, 2021
@ntsekouras ntsekouras added the [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced label Jan 4, 2021
@github-actions
Copy link

github-actions bot commented Jan 4, 2021

Size Change: +8 B (0%)

Total Size: 1.25 MB

Filename Size Change
build/block-editor/index.js 125 kB +8 B (0%)
ℹ️ View Unchanged
Filename Size Change
build/a11y/index.js 1.01 kB 0 B
build/annotations/index.js 3.48 kB 0 B
build/api-fetch/index.js 3.19 kB 0 B
build/autop/index.js 2.6 kB 0 B
build/blob/index.js 514 B 0 B
build/block-directory/index.js 8.16 kB 0 B
build/block-directory/style-rtl.css 943 B 0 B
build/block-directory/style.css 942 B 0 B
build/block-editor/style-rtl.css 11.3 kB 0 B
build/block-editor/style.css 11.2 kB 0 B
build/block-library/blocks/archives/editor-rtl.css 120 B 0 B
build/block-library/blocks/archives/editor.css 119 B 0 B
build/block-library/blocks/audio/editor-rtl.css 118 B 0 B
build/block-library/blocks/audio/editor.css 118 B 0 B
build/block-library/blocks/audio/style-rtl.css 152 B 0 B
build/block-library/blocks/audio/style.css 152 B 0 B
build/block-library/blocks/block/editor-rtl.css 211 B 0 B
build/block-library/blocks/block/editor.css 211 B 0 B
build/block-library/blocks/button/editor-rtl.css 513 B 0 B
build/block-library/blocks/button/editor.css 513 B 0 B
build/block-library/blocks/button/style-rtl.css 488 B 0 B
build/block-library/blocks/button/style.css 488 B 0 B
build/block-library/blocks/buttons/editor-rtl.css 275 B 0 B
build/block-library/blocks/buttons/editor.css 275 B 0 B
build/block-library/blocks/buttons/style-rtl.css 346 B 0 B
build/block-library/blocks/buttons/style.css 346 B 0 B
build/block-library/blocks/calendar/style-rtl.css 249 B 0 B
build/block-library/blocks/calendar/style.css 249 B 0 B
build/block-library/blocks/categories/editor-rtl.css 135 B 0 B
build/block-library/blocks/categories/editor.css 135 B 0 B
build/block-library/blocks/categories/style-rtl.css 132 B 0 B
build/block-library/blocks/categories/style.css 132 B 0 B
build/block-library/blocks/code/style-rtl.css 141 B 0 B
build/block-library/blocks/code/style.css 141 B 0 B
build/block-library/blocks/columns/editor-rtl.css 239 B 0 B
build/block-library/blocks/columns/editor.css 239 B 0 B
build/block-library/blocks/columns/style-rtl.css 467 B 0 B
build/block-library/blocks/columns/style.css 466 B 0 B
build/block-library/blocks/cover/editor-rtl.css 440 B 0 B
build/block-library/blocks/cover/editor.css 438 B 0 B
build/block-library/blocks/cover/style-rtl.css 1.27 kB 0 B
build/block-library/blocks/cover/style.css 1.27 kB 0 B
build/block-library/blocks/embed/editor-rtl.css 529 B 0 B
build/block-library/blocks/embed/editor.css 529 B 0 B
build/block-library/blocks/embed/style-rtl.css 419 B 0 B
build/block-library/blocks/embed/style.css 419 B 0 B
build/block-library/blocks/file/editor-rtl.css 246 B 0 B
build/block-library/blocks/file/editor.css 245 B 0 B
build/block-library/blocks/file/style-rtl.css 288 B 0 B
build/block-library/blocks/file/style.css 289 B 0 B
build/block-library/blocks/freeform/editor-rtl.css 2.49 kB 0 B
build/block-library/blocks/freeform/editor.css 2.49 kB 0 B
build/block-library/blocks/gallery/editor-rtl.css 692 B 0 B
build/block-library/blocks/gallery/editor.css 693 B 0 B
build/block-library/blocks/gallery/style-rtl.css 1.11 kB 0 B
build/block-library/blocks/gallery/style.css 1.11 kB 0 B
build/block-library/blocks/group/editor-rtl.css 364 B 0 B
build/block-library/blocks/group/editor.css 364 B 0 B
build/block-library/blocks/group/style-rtl.css 117 B 0 B
build/block-library/blocks/group/style.css 117 B 0 B
build/block-library/blocks/heading/editor-rtl.css 174 B 0 B
build/block-library/blocks/heading/editor.css 174 B 0 B
build/block-library/blocks/heading/style-rtl.css 137 B 0 B
build/block-library/blocks/heading/style.css 137 B 0 B
build/block-library/blocks/html/editor-rtl.css 322 B 0 B
build/block-library/blocks/html/editor.css 324 B 0 B
build/block-library/blocks/image/editor-rtl.css 738 B 0 B
build/block-library/blocks/image/editor.css 737 B 0 B
build/block-library/blocks/image/style-rtl.css 510 B 0 B
build/block-library/blocks/image/style.css 511 B 0 B
build/block-library/blocks/latest-comments/editor-rtl.css 201 B 0 B
build/block-library/blocks/latest-comments/editor.css 200 B 0 B
build/block-library/blocks/latest-comments/style-rtl.css 315 B 0 B
build/block-library/blocks/latest-comments/style.css 315 B 0 B
build/block-library/blocks/latest-posts/editor-rtl.css 183 B 0 B
build/block-library/blocks/latest-posts/editor.css 183 B 0 B
build/block-library/blocks/latest-posts/style-rtl.css 568 B 0 B
build/block-library/blocks/latest-posts/style.css 567 B 0 B
build/block-library/blocks/list/editor-rtl.css 129 B 0 B
build/block-library/blocks/list/editor.css 129 B 0 B
build/block-library/blocks/list/style-rtl.css 127 B 0 B
build/block-library/blocks/list/style.css 127 B 0 B
build/block-library/blocks/media-text/editor-rtl.css 240 B 0 B
build/block-library/blocks/media-text/editor.css 240 B 0 B
build/block-library/blocks/media-text/style-rtl.css 579 B 0 B
build/block-library/blocks/media-text/style.css 577 B 0 B
build/block-library/blocks/more/editor-rtl.css 479 B 0 B
build/block-library/blocks/more/editor.css 479 B 0 B
build/block-library/blocks/navigation-link/editor-rtl.css 438 B 0 B
build/block-library/blocks/navigation-link/editor.css 440 B 0 B
build/block-library/blocks/navigation-link/style-rtl.css 747 B 0 B
build/block-library/blocks/navigation-link/style.css 745 B 0 B
build/block-library/blocks/navigation/editor-rtl.css 1.31 kB 0 B
build/block-library/blocks/navigation/editor.css 1.31 kB 0 B
build/block-library/blocks/navigation/style-rtl.css 205 B 0 B
build/block-library/blocks/navigation/style.css 205 B 0 B
build/block-library/blocks/nextpage/editor-rtl.css 440 B 0 B
build/block-library/blocks/nextpage/editor.css 440 B 0 B
build/block-library/blocks/paragraph/editor-rtl.css 161 B 0 B
build/block-library/blocks/paragraph/editor.css 161 B 0 B
build/block-library/blocks/paragraph/style-rtl.css 279 B 0 B
build/block-library/blocks/paragraph/style.css 279 B 0 B
build/block-library/blocks/post-author/editor-rtl.css 255 B 0 B
build/block-library/blocks/post-author/editor.css 255 B 0 B
build/block-library/blocks/post-author/style-rtl.css 229 B 0 B
build/block-library/blocks/post-author/style.css 230 B 0 B
build/block-library/blocks/post-comments-form/style-rtl.css 293 B 0 B
build/block-library/blocks/post-comments-form/style.css 293 B 0 B
build/block-library/blocks/post-content/editor-rtl.css 187 B 0 B
build/block-library/blocks/post-content/editor.css 187 B 0 B
build/block-library/blocks/post-excerpt/editor-rtl.css 134 B 0 B
build/block-library/blocks/post-excerpt/editor.css 134 B 0 B
build/block-library/blocks/post-featured-image/editor-rtl.css 387 B 0 B
build/block-library/blocks/post-featured-image/editor.css 386 B 0 B
build/block-library/blocks/post-featured-image/style-rtl.css 149 B 0 B
build/block-library/blocks/post-featured-image/style.css 149 B 0 B
build/block-library/blocks/preformatted/style-rtl.css 119 B 0 B
build/block-library/blocks/preformatted/style.css 119 B 0 B
build/block-library/blocks/pullquote/editor-rtl.css 231 B 0 B
build/block-library/blocks/pullquote/editor.css 231 B 0 B
build/block-library/blocks/pullquote/style-rtl.css 359 B 0 B
build/block-library/blocks/pullquote/style.css 359 B 0 B
build/block-library/blocks/query-loop/editor-rtl.css 142 B 0 B
build/block-library/blocks/query-loop/editor.css 141 B 0 B
build/block-library/blocks/query-loop/style-rtl.css 361 B 0 B
build/block-library/blocks/query-loop/style.css 363 B 0 B
build/block-library/blocks/query/editor-rtl.css 210 B 0 B
build/block-library/blocks/query/editor.css 210 B 0 B
build/block-library/blocks/quote/editor-rtl.css 121 B 0 B
build/block-library/blocks/quote/editor.css 121 B 0 B
build/block-library/blocks/quote/style-rtl.css 215 B 0 B
build/block-library/blocks/quote/style.css 214 B 0 B
build/block-library/blocks/rss/editor-rtl.css 245 B 0 B
build/block-library/blocks/rss/editor.css 246 B 0 B
build/block-library/blocks/rss/style-rtl.css 329 B 0 B
build/block-library/blocks/rss/style.css 328 B 0 B
build/block-library/blocks/search/editor-rtl.css 213 B 0 B
build/block-library/blocks/search/editor.css 213 B 0 B
build/block-library/blocks/search/style-rtl.css 384 B 0 B
build/block-library/blocks/search/style.css 386 B 0 B
build/block-library/blocks/separator/editor-rtl.css 151 B 0 B
build/block-library/blocks/separator/editor.css 151 B 0 B
build/block-library/blocks/separator/style-rtl.css 281 B 0 B
build/block-library/blocks/separator/style.css 281 B 0 B
build/block-library/blocks/shortcode/editor-rtl.css 547 B 0 B
build/block-library/blocks/shortcode/editor.css 547 B 0 B
build/block-library/blocks/site-logo/editor-rtl.css 251 B 0 B
build/block-library/blocks/site-logo/editor.css 251 B 0 B
build/block-library/blocks/site-logo/style-rtl.css 166 B 0 B
build/block-library/blocks/site-logo/style.css 166 B 0 B
build/block-library/blocks/social-link/editor-rtl.css 211 B 0 B
build/block-library/blocks/social-link/editor.css 211 B 0 B
build/block-library/blocks/social-links/editor-rtl.css 749 B 0 B
build/block-library/blocks/social-links/editor.css 749 B 0 B
build/block-library/blocks/social-links/style-rtl.css 1.37 kB 0 B
build/block-library/blocks/social-links/style.css 1.37 kB 0 B
build/block-library/blocks/spacer/editor-rtl.css 321 B 0 B
build/block-library/blocks/spacer/editor.css 321 B 0 B
build/block-library/blocks/spacer/style-rtl.css 107 B 0 B
build/block-library/blocks/spacer/style.css 107 B 0 B
build/block-library/blocks/subhead/editor-rtl.css 148 B 0 B
build/block-library/blocks/subhead/editor.css 148 B 0 B
build/block-library/blocks/subhead/style-rtl.css 134 B 0 B
build/block-library/blocks/subhead/style.css 134 B 0 B
build/block-library/blocks/table/editor-rtl.css 530 B 0 B
build/block-library/blocks/table/editor.css 530 B 0 B
build/block-library/blocks/table/style-rtl.css 433 B 0 B
build/block-library/blocks/table/style.css 433 B 0 B
build/block-library/blocks/tag-cloud/editor-rtl.css 162 B 0 B
build/block-library/blocks/tag-cloud/editor.css 162 B 0 B
build/block-library/blocks/tag-cloud/style-rtl.css 145 B 0 B
build/block-library/blocks/tag-cloud/style.css 145 B 0 B
build/block-library/blocks/template-part/editor-rtl.css 644 B 0 B
build/block-library/blocks/template-part/editor.css 645 B 0 B
build/block-library/blocks/text-columns/editor-rtl.css 146 B 0 B
build/block-library/blocks/text-columns/editor.css 146 B 0 B
build/block-library/blocks/text-columns/style-rtl.css 209 B 0 B
build/block-library/blocks/text-columns/style.css 209 B 0 B
build/block-library/blocks/verse/editor-rtl.css 118 B 0 B
build/block-library/blocks/verse/editor.css 118 B 0 B
build/block-library/blocks/verse/style-rtl.css 137 B 0 B
build/block-library/blocks/verse/style.css 137 B 0 B
build/block-library/blocks/video/editor-rtl.css 547 B 0 B
build/block-library/blocks/video/editor.css 548 B 0 B
build/block-library/blocks/video/style-rtl.css 241 B 0 B
build/block-library/blocks/video/style.css 241 B 0 B
build/block-library/common-rtl.css 940 B 0 B
build/block-library/common.css 937 B 0 B
build/block-library/editor-rtl.css 8.87 kB 0 B
build/block-library/editor.css 8.87 kB 0 B
build/block-library/index.js 148 kB 0 B
build/block-library/style-rtl.css 8.48 kB 0 B
build/block-library/style.css 8.48 kB 0 B
build/block-library/theme-rtl.css 789 B 0 B
build/block-library/theme.css 790 B 0 B
build/block-serialization-default-parser/index.js 1.63 kB 0 B
build/block-serialization-spec-parser/index.js 2.77 kB 0 B
build/blocks/index.js 47.3 kB 0 B
build/components/index.js 163 kB 0 B
build/components/style-rtl.css 15.4 kB 0 B
build/components/style.css 15.4 kB 0 B
build/compose/index.js 10.8 kB 0 B
build/core-data/index.js 14.7 kB 0 B
build/data-controls/index.js 676 B 0 B
build/data/index.js 8.62 kB 0 B
build/date/index.js 31.4 kB 0 B
build/deprecated/index.js 610 B 0 B
build/dom-ready/index.js 418 B 0 B
build/dom/index.js 4.67 kB 0 B
build/edit-navigation/index.js 10.6 kB 0 B
build/edit-navigation/style-rtl.css 881 B 0 B
build/edit-navigation/style.css 885 B 0 B
build/edit-post/index.js 303 kB 0 B
build/edit-post/style-rtl.css 6.47 kB 0 B
build/edit-post/style.css 6.45 kB 0 B
build/edit-site/index.js 23.3 kB 0 B
build/edit-site/style-rtl.css 3.91 kB 0 B
build/edit-site/style.css 3.91 kB 0 B
build/edit-widgets/index.js 24.1 kB 0 B
build/edit-widgets/style-rtl.css 3.1 kB 0 B
build/edit-widgets/style.css 3.1 kB 0 B
build/editor/editor-styles-rtl.css 476 B 0 B
build/editor/editor-styles.css 478 B 0 B
build/editor/index.js 41.6 kB 0 B
build/editor/style-rtl.css 3.84 kB 0 B
build/editor/style.css 3.84 kB 0 B
build/element/index.js 4.22 kB 0 B
build/escape-html/index.js 578 B 0 B
build/format-library/index.js 6.24 kB 0 B
build/format-library/style-rtl.css 547 B 0 B
build/format-library/style.css 548 B 0 B
build/hooks/index.js 1.75 kB 0 B
build/html-entities/index.js 476 B 0 B
build/i18n/index.js 3.43 kB 0 B
build/is-shallow-equal/index.js 552 B 0 B
build/keyboard-shortcuts/index.js 2.22 kB 0 B
build/keycodes/index.js 1.67 kB 0 B
build/list-reusable-blocks/index.js 2.84 kB 0 B
build/list-reusable-blocks/style-rtl.css 476 B 0 B
build/list-reusable-blocks/style.css 476 B 0 B
build/media-utils/index.js 4.95 kB 0 B
build/notices/index.js 1.61 kB 0 B
build/nux/index.js 3.07 kB 0 B
build/nux/style-rtl.css 671 B 0 B
build/nux/style.css 668 B 0 B
build/plugins/index.js 2.23 kB 0 B
build/primitives/index.js 1.21 kB 0 B
build/priority-queue/index.js 636 B 0 B
build/redux-routine/index.js 2.68 kB 0 B
build/reusable-blocks/index.js 2.68 kB 0 B
build/rich-text/index.js 13 kB 0 B
build/server-side-render/index.js 2.44 kB 0 B
build/shortcode/index.js 1.56 kB 0 B
build/token-list/index.js 1.1 kB 0 B
build/url/index.js 2.73 kB 0 B
build/viewport/index.js 1.57 kB 0 B
build/warning/index.js 363 B 0 B
build/wordcount/index.js 1.07 kB 0 B

compressed-size-action

Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great, thanks for the fix.

@youknowriad youknowriad added the Backport to WP Minor Release Pull request that needs to be backported to a WordPress minor release label Jan 4, 2021
@ntsekouras ntsekouras merged commit 7d61a5c into master Jan 4, 2021
WordPress 5.7 Must Haves automation moved this from Needs Review to Done Jan 4, 2021
@ntsekouras ntsekouras deleted the fix/crash-no-categories-in-block-pattern branch January 4, 2021 14:09
@github-actions github-actions bot added this to the Gutenberg 9.8 milestone Jan 4, 2021
@skorasaurus skorasaurus mentioned this pull request Jan 4, 2021
6 tasks
@noisysocks noisysocks added this to Needs Review in WordPress 5.6.x Must Haves via automation Jan 4, 2021
@noisysocks noisysocks removed this from Done in WordPress 5.7 Must Haves Jan 4, 2021
@youknowriad youknowriad moved this from Needs Review to Done in WordPress 5.6.x Must Haves Jan 5, 2021
pento pushed a commit to WordPress/wordpress-develop that referenced this pull request Jan 28, 2021
These are backports coming for the 5.6.1 release.

Summary of the following issues: 


* [#27970](WordPress/gutenberg#27970) - Fix editor crash when registering a block pattern without `categories`  Backport to WP Minor Release [Feature] Inserter [Feature] Patterns [Type] Bug
* [#27733](WordPress/gutenberg#27733) - [Embed block]: Add html and reusable support back  Backport to WP Minor Release [Block] Embed [Type] Regression
* [#27727](WordPress/gutenberg#27727) - Add aria labels to box control component inputs/button  Backport to WP Minor Release [Feature] UI Components [Package] Components [Type] Bug [a11y] Labelling
* [#27627](WordPress/gutenberg#27627) - HTML Block: Fix editor styles  Backport to WP Minor Release [Block] HTML [Type] Regression
* [#27526](WordPress/gutenberg#27526) - Core Data: Normalize `_fields` value for use in `stableKey`  Backport to WP Minor Release [Package] Core data [Type] Bug
* [#26705](WordPress/gutenberg#26705) - Fix: Font size picker does not correctly handles big font sizes.  Backport to WP Minor Release [Type] Bug
* [#26432](WordPress/gutenberg#26432) - Edit Site: prevent inserter overscroll  Backport to WP Minor Release First-time Contributor [Feature] Full Site Editing [Type] Bug


Packages updated:

@wordpress/block-directory@1.17.7
@wordpress/block-editor@5.1.6
@wordpress/block-library@2.26.7
@wordpress/components@11.1.4
@wordpress/core-data@2.24.3
@wordpress/edit-post@3.25.7
@wordpress/edit-site@1.15.7
@wordpress/edit-widgets@1.1.7
@wordpress/editor@9.24.6
@wordpress/format-library@1.25.6
@wordpress/interface@0.10.7
@wordpress/list-reusable-blocks@1.24.4
@wordpress/nux@3.23.4
@wordpress/reusable-blocks@1.0.6
@wordpress/server-side-render@1.19.4

Fixes #52391.

Props gziolo, whyisjake.


git-svn-id: https://develop.svn.wordpress.org/branches/5.6@50061 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Jan 28, 2021
These are backports coming for the 5.6.1 release.

Summary of the following issues: 


* [#27970](WordPress/gutenberg#27970) - Fix editor crash when registering a block pattern without `categories`  Backport to WP Minor Release [Feature] Inserter [Feature] Patterns [Type] Bug
* [#27733](WordPress/gutenberg#27733) - [Embed block]: Add html and reusable support back  Backport to WP Minor Release [Block] Embed [Type] Regression
* [#27727](WordPress/gutenberg#27727) - Add aria labels to box control component inputs/button  Backport to WP Minor Release [Feature] UI Components [Package] Components [Type] Bug [a11y] Labelling
* [#27627](WordPress/gutenberg#27627) - HTML Block: Fix editor styles  Backport to WP Minor Release [Block] HTML [Type] Regression
* [#27526](WordPress/gutenberg#27526) - Core Data: Normalize `_fields` value for use in `stableKey`  Backport to WP Minor Release [Package] Core data [Type] Bug
* [#26705](WordPress/gutenberg#26705) - Fix: Font size picker does not correctly handles big font sizes.  Backport to WP Minor Release [Type] Bug
* [#26432](WordPress/gutenberg#26432) - Edit Site: prevent inserter overscroll  Backport to WP Minor Release First-time Contributor [Feature] Full Site Editing [Type] Bug


Packages updated:

@wordpress/block-directory@1.17.7
@wordpress/block-editor@5.1.6
@wordpress/block-library@2.26.7
@wordpress/components@11.1.4
@wordpress/core-data@2.24.3
@wordpress/edit-post@3.25.7
@wordpress/edit-site@1.15.7
@wordpress/edit-widgets@1.1.7
@wordpress/editor@9.24.6
@wordpress/format-library@1.25.6
@wordpress/interface@0.10.7
@wordpress/list-reusable-blocks@1.24.4
@wordpress/nux@3.23.4
@wordpress/reusable-blocks@1.0.6
@wordpress/server-side-render@1.19.4

Fixes #52391.

Props gziolo, whyisjake.

Built from https://develop.svn.wordpress.org/branches/5.6@50061


git-svn-id: http://core.svn.wordpress.org/branches/5.6@49762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
gMagicScott pushed a commit to gMagicScott/core.wordpress-mirror that referenced this pull request Jan 28, 2021
These are backports coming for the 5.6.1 release.

Summary of the following issues: 


* [#27970](WordPress/gutenberg#27970) - Fix editor crash when registering a block pattern without `categories`  Backport to WP Minor Release [Feature] Inserter [Feature] Patterns [Type] Bug
* [#27733](WordPress/gutenberg#27733) - [Embed block]: Add html and reusable support back  Backport to WP Minor Release [Block] Embed [Type] Regression
* [#27727](WordPress/gutenberg#27727) - Add aria labels to box control component inputs/button  Backport to WP Minor Release [Feature] UI Components [Package] Components [Type] Bug [a11y] Labelling
* [#27627](WordPress/gutenberg#27627) - HTML Block: Fix editor styles  Backport to WP Minor Release [Block] HTML [Type] Regression
* [#27526](WordPress/gutenberg#27526) - Core Data: Normalize `_fields` value for use in `stableKey`  Backport to WP Minor Release [Package] Core data [Type] Bug
* [#26705](WordPress/gutenberg#26705) - Fix: Font size picker does not correctly handles big font sizes.  Backport to WP Minor Release [Type] Bug
* [#26432](WordPress/gutenberg#26432) - Edit Site: prevent inserter overscroll  Backport to WP Minor Release First-time Contributor [Feature] Full Site Editing [Type] Bug


Packages updated:

@wordpress/block-directory@1.17.7
@wordpress/block-editor@5.1.6
@wordpress/block-library@2.26.7
@wordpress/components@11.1.4
@wordpress/core-data@2.24.3
@wordpress/edit-post@3.25.7
@wordpress/edit-site@1.15.7
@wordpress/edit-widgets@1.1.7
@wordpress/editor@9.24.6
@wordpress/format-library@1.25.6
@wordpress/interface@0.10.7
@wordpress/list-reusable-blocks@1.24.4
@wordpress/nux@3.23.4
@wordpress/reusable-blocks@1.0.6
@wordpress/server-side-render@1.19.4

Fixes #52391.

Props gziolo, whyisjake.

Built from https://develop.svn.wordpress.org/branches/5.6@50061


git-svn-id: https://core.svn.wordpress.org/branches/5.6@49762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
@pwkip
Copy link
Contributor

pwkip commented Feb 6, 2021

Maybe not the proper place to report this, but this fix doesn't work if you also remove the core blocks.
So this example still results in an editor crash:

remove_theme_support('core-block-patterns');

register_block_pattern(
	'test/test-case-block-pattern',
	array(
		'title'       => __( 'a simple heading', 'what should this be' ),
		'description' => _x( 'mmm..cake', ' this is slang and has more nuance in english', ''),
		'content'     => '<!-- wp:heading --><h2>The history of cake</h2><!-- /wp:heading -->',
	)
);

@talldan
Copy link
Contributor

talldan commented Feb 15, 2021

This was shipped in 5.6.1, so removing the backport label:
https://make.wordpress.org/core/2021/01/28/wordpress-5-6-1-rc1/

@talldan talldan removed the Backport to WP Minor Release Pull request that needs to be backported to a WordPress minor release label Feb 15, 2021
VenusPR added a commit to VenusPR/Wordpress_Richard that referenced this pull request Mar 9, 2023
These are backports coming for the 5.6.1 release.

Summary of the following issues: 


* [#27970](WordPress/gutenberg#27970) - Fix editor crash when registering a block pattern without `categories`  Backport to WP Minor Release [Feature] Inserter [Feature] Patterns [Type] Bug
* [#27733](WordPress/gutenberg#27733) - [Embed block]: Add html and reusable support back  Backport to WP Minor Release [Block] Embed [Type] Regression
* [#27727](WordPress/gutenberg#27727) - Add aria labels to box control component inputs/button  Backport to WP Minor Release [Feature] UI Components [Package] Components [Type] Bug [a11y] Labelling
* [#27627](WordPress/gutenberg#27627) - HTML Block: Fix editor styles  Backport to WP Minor Release [Block] HTML [Type] Regression
* [#27526](WordPress/gutenberg#27526) - Core Data: Normalize `_fields` value for use in `stableKey`  Backport to WP Minor Release [Package] Core data [Type] Bug
* [#26705](WordPress/gutenberg#26705) - Fix: Font size picker does not correctly handles big font sizes.  Backport to WP Minor Release [Type] Bug
* [#26432](WordPress/gutenberg#26432) - Edit Site: prevent inserter overscroll  Backport to WP Minor Release First-time Contributor [Feature] Full Site Editing [Type] Bug


Packages updated:

@wordpress/block-directory@1.17.7
@wordpress/block-editor@5.1.6
@wordpress/block-library@2.26.7
@wordpress/components@11.1.4
@wordpress/core-data@2.24.3
@wordpress/edit-post@3.25.7
@wordpress/edit-site@1.15.7
@wordpress/edit-widgets@1.1.7
@wordpress/editor@9.24.6
@wordpress/format-library@1.25.6
@wordpress/interface@0.10.7
@wordpress/list-reusable-blocks@1.24.4
@wordpress/nux@3.23.4
@wordpress/reusable-blocks@1.0.6
@wordpress/server-side-render@1.19.4

Fixes #52391.

Props gziolo, whyisjake.

Built from https://develop.svn.wordpress.org/branches/5.6@50061


git-svn-id: http://core.svn.wordpress.org/branches/5.6@49762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Type] Bug An existing feature does not function as intended
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Block Patterns without a category crashes the block editor
4 participants