[wp-trac] [WordPress Trac] #62030: Can't Access Some Block Templates in Classic Themes
WordPress Trac
noreply at wordpress.org
Tue Sep 10 19:02:48 UTC 2024
#62030: Can't Access Some Block Templates in Classic Themes
--------------------------------------+-----------------------------
Reporter: woodardmc | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version: 6.6.2
Severity: normal | Keywords:
Focuses: administration, template |
--------------------------------------+-----------------------------
In classic themes that have the `block-templates` theme support I've found
that block templates with certain names become unmanageable after
creation. This seems to be because their slugs are special or reserved in
some way.
The two names I've found so far are "home" and "archive".
If you create a block template with these names, they are still used on
the frontend as normal. However, they do not appear in the list of
templates you can edit and trying to access them from the template
editor's command palette leads to an error reporting: "The theme you are
currently using is not compatible with the Site Editor."
This means that I can create a template that will potentially get used as
my site's archive template, but I cannot edit or remove it.
I would expect any block template I can create in a classic theme through
the template editor to be manageable from there as well.
Otherwise, if I shouldn't be able to manage these templates, then I
shouldn't be able to create them either.
**My Test Environment**
- WordPress: 6.6.2
- PHP: 8.1.9
- MySQL: 8.0.16
- Theme: Twenty Twenty One with `block-templates` theme support added.
- Plugins: none
**Steps to Reproduce**
- Create a new page.
- Click the template button.
- Choose to create a new template.
- Name the template "archive"
- Save the template. (you may see an error that saving failed)
- Check the wp_posts table for a new wp_template post, see that the
"archive" template is in the table.
- Load an archive page on your site, see that the new "archive" block
template is being applied.
- Go back to editing the page and refresh the page
- Click the template button.
- The "archive" template just created does not appear here and cannot be
edited.
Here is a video of the issue as well:
https://www.loom.com/share/005335d1ca0e4869b4980976f96a6a5b
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62030>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list