Skip to content

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 requested a review from spacedmonkey as a code owner July 20, 2022 08:46
@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
@Mamaduka Mamaduka requested review from gziolo and ntsekouras July 20, 2022 08:47
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.

3 participants