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

Plugin: Compatibility fixes for WP 5.9 and Site Editor #42549

Merged
merged 2 commits into from
Jul 20, 2022

Conversation

Mamaduka
Copy link
Member

What?

PR makes Site Editor accessible when running the Gutenberg plugin with WP 5.9.

Regression after #41306.
Related #38817.

Why?

The Site Editor relies on server-side redirection to resolve the homepage template. Before #41306 plugin was using a custom page to render Site Editor, and this page was handling redirection.

Testing Instructions

WordPress 6.0.x

  1. Open Site Editor and confirm there are no infinite redirections.

WordPress 5.9.x

You can use the following WP CLI command to downgrade local installation:

wp core update --version=5.9.3 --force
  1. Open Site Editor and confirm you're correctly redirected. Redirection will add query args for postType and postId.
  2. Confirm you can access Template and Template Part views.

@Mamaduka Mamaduka self-assigned this Jul 20, 2022
@Mamaduka Mamaduka added Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts Backwards Compatibility Issues or PRs that impact backwards compatability [Type] Regression Related to a regression in the latest release labels Jul 20, 2022
@@ -70,7 +70,7 @@ function gutenberg_is_experiment_enabled( $name ) {
require __DIR__ . '/compat/wordpress-6.0/class-wp-theme-json-6-0.php';
require __DIR__ . '/compat/wordpress-6.0/class-wp-theme-json-resolver-6-0.php';
require __DIR__ . '/compat/wordpress-6.0/block-patterns.php';
require __DIR__ . '/compat/wordpress-6.0/block-template.php';
require __DIR__ . '/compat/wordpress-6.0/site-editor.php';
Copy link
Member Author

Choose a reason for hiding this comment

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

I renamed the file since now it only houses site editor compat code.

@Mamaduka Mamaduka removed the request for review from spacedmonkey July 20, 2022 08:54
Copy link
Contributor

@ntsekouras ntsekouras left a comment

Choose a reason for hiding this comment

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

Thanks for handling this George! I guess now that we don't have more 'bucket' files in lib folder, we might avoid similar issues.

@Mamaduka Mamaduka merged commit 65c5477 into trunk Jul 20, 2022
@Mamaduka Mamaduka deleted the fix/wp-5.9-compatiblity branch July 20, 2022 10:37
@github-actions github-actions bot added this to the Gutenberg 13.8 milestone Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts [Type] Regression Related to a regression in the latest release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants