Page Inspector Swap Template Functionally has broken the page template hierarchy #54596
Labels
[Feature] Site Editor
Related to the overarching Site Editor (formerly "full site editing")
[Type] Bug
An existing feature does not function as intended
Description
This PR merged last week introduced the ability to "swap templates" for pages. However, something in this PR has broken the page template hierarchy, meaning in the site editor only, it claims the "Pages" template is in use, when in fact a custom template exists.
As an example, in this case there is a template called
page-cart
. This is also registered via thepage_template_hierarchy
filter to ensure it has priority over all other templates. Before #51477 this is what you would see in the page editor:After #51477 you can see it now uses the generic "pages" template instead:
Whats more, the preview in the site editor also uses the "pages" template. The frontend views still use
page-cart
as before.It seems as though the issues are:
Step-by-step reproduction instructions
We're running into this issue with WooCommerce Blocks which includes a cart template which should be the default.
nvm use && npm install && npm run build
Screenshots, screen recording, code snippet
No response
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
No
The text was updated successfully, but these errors were encountered: