Skip to content

Conversation

@petitphp
Copy link

What?

Add check for the main query before modying it when resolving the template for new posts.

Why?

Fix 404 response when resolving template for new posts/pages resulting of the wrong query being modified.

Testing Instructions

  • Create a new post
  • Look at the sidebar panel "Template" and check it display the correct value instead of "404"

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

Copy link
Contributor

@adamziel adamziel left a comment

Choose a reason for hiding this comment

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

This looks good to me. I know @petitphp mentioned the issue is also present in WordPress 5.9 – @SergeyBiryukov, what does the process for that look like? Should it be a separate PR, or would you be able to reuse this one when committing?

@SergeyBiryukov
Copy link
Member

SergeyBiryukov commented Jun 29, 2022

I know @petitphp mentioned the issue is also present in WordPress 5.9 – @SergeyBiryukov, what does the process for that look like? Should it be a separate PR, or would you be able to reuse this one when committing?

I think we generally only backport bug fixes to the latest stable branch, which is 6.0.x at the moment. The 5.9.x branch would only be open for security fixes at this point.

@SergeyBiryukov
Copy link
Member

Thanks for the PR! Merged into WP trunk in r53593, backported to the 6.0 branch in r53594.

@petitphp petitphp deleted the fix/backport-gutenberg-40799-to-WP60 branch October 11, 2022 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants