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

Block Template creation is using empty content instead of the appropiate fallback #36648

Closed
MaggieCabrera opened this issue Nov 19, 2021 · 2 comments · Fixed by #42520
Closed
Assignees

Comments

@MaggieCabrera
Copy link
Contributor

Description

This was brought to my attention by @carolinan over at WordPress/twentytwentytwo#256

When a theme doesn't provide a template for a specific page (404, Search for example) we will always fallback through the hierarchy and show in the frontend an alternative existing template. In the case of TT2, if the search.html doesn't exist, the frontend will show index.html instead:

Screenshot 2021-11-19 at 13 49 46

This is inconsistent with what the flow of template creation is showing us. When you try to create a new Search template, we see no content at all:

Screenshot 2021-11-19 at 13 49 24

Screenshot 2021-11-19 at 13 49 40

This is inconsistent with what the user sees in the frontend before creating the template and forces them to create something from scratch.

Step-by-step reproduction instructions

  1. Install TT2, check in the frontend what a search results page returns
  2. Go to the Site Editor and try to create a Search template
  3. The Search template is empty.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@kjellr
Copy link
Contributor

kjellr commented Nov 19, 2021

cc @jameskoster do you know if this is a bug or not? I'm not sure if the site editor used to be smarter about this or not.

@jameskoster
Copy link
Contributor

Yup, this is listed as a todo on #36597 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment