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

Update npm packages to latest versions for 6.4 #5618

Closed
wants to merge 1 commit into from

Conversation

mikachan
Copy link
Member

@mikachan mikachan commented Nov 5, 2023

Trac ticket: https://core.trac.wordpress.org/ticket/59411

Included changes:

New published packages for this update: WordPress/gutenberg@8447c60


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@hellofromtonya
Copy link
Contributor

hellofromtonya commented Nov 5, 2023

Test Report

Steps to Reproduce

Followed the test instructions found in the GB issue WordPress/gutenberg#55846.

  1. Created a wp-includes/mu-plugins/ directory.
  2. Created a new test.php file in that directory.
  3. Added the following code to that file:
<?php

add_action( 'init', function() {
	register_post_type(
		'my-test',
		array(
			'public'       => true,
			'show_in_rest' => true,
			'template'     => array(
				array(
					'core/pattern',
					array( 'slug' => 'core/simple-header-with-dark-background' ),
				),
			),
			'labels'                => array(
				'name'          => 'My Test',
				'singular_name' => 'My Test',
			),
		)
	);
} );
  1. Using WordPress 6.3.2, launched and logged into my local testing site.
  2. Navigated to "My Test" > "Add New Post". (No error)
  3. Added a title: "Pattern as Template".
  4. Published.
  5. Upgraded to WordPress 6.4 RC3 using wp core update --version=6.4-RC3.
  6. Refreshed the "Pattern as Template" screen. (No error)
  7. Navigated back to the "My Test" UI.
  8. Added a "my-test" post.
  9. 🐞 Bug occurs when the editor opens, when creating a new post for a custom post type.

Results with reproducing the regression

With 6.3.2:

  • ✅ When creating a new post for a custom post type: pattern renders without issue (no error).
  • ✅ When opening an existing post (for a custom post type): pattern renders without issue (no error).
  • ✅ In the frontend, an existing and new post both render correctly (no error).

With 6.4 RC3 and the current 6.4 branch and with TT3 or TT4 theme and no activated plugins:

  • ❌ 🐞 When creating a new post for a custom post type: pattern cannot be previewed and a console error is raised.
This block has encountered an error and cannot be previewed.
Uncaught TypeError: select(...).getCurrentTheme() is undefined

TestReport-6 4RC3-in-editor

  • ✅ When opening an existing post (for a custom post type): pattern renders without issue (no error).
  • In the frontend:
    • ❌ 🐞 the newly added "my-test" post's pattern does not render.
    • ✅ the existing "my-test" post pattern does render.

Test Report 6 4 RC3 in the frontend

Test Report Icons:
🐞 <= Indicates where issue ("bug") occurs.
✅ <= Behavior is ''expected''.
❌ <= Behavior is ''NOT expected''.

Observations

This regression only affects:

  • New posts for any custom post type that sets its "template" as a pattern.
  • The pattern within that new post(s) in the editor and frontend.

Other blocks within a new post do not seem to be affected.

@hellofromtonya
Copy link
Contributor

For the pattern as template regression: this PR resolves the issue ✅

Copy link
Contributor

@hellofromtonya hellofromtonya left a comment

Choose a reason for hiding this comment

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

In my testing:

  • can reproduce the reported issue.
  • confirm this PR resolves it.

Changes the LGTM. Ready for commit 👍

@hellofromtonya
Copy link
Contributor

Committed to trunk via https://core.trac.wordpress.org/changeset/57063.

@mikachan mikachan deleted the gb-sync-6.4-11.5 branch November 5, 2023 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants