Closed carolinan closed 2 years ago
Pinging @ellenbauer in case you want to test if you can reproduce this.
Way over my head here, but it seems that the template is undefined
, which leads to the missing edit link, when this condition is triggered: https://github.com/WordPress/gutenberg/blob/trunk/packages/edit-post/src/store/selectors.js#L399
I can't explain this but if I delete the page.html AND search.html templates from the theme, sidebar-post-template.html has a visible and working edit link.
Description
In a custom block theme, I have the following custom templates in the templates folder: no-title-template.html sidebar-page-template.html sidebar-post-template.html
I am using these longer names because I don't want them to be automatically assigned to a post called "sidebar" and so on.
In theme.json:
The no title template has an Edit link when it is selected in the Template section in the block editor. The other two do not have an edit link. (Changing the PostTypes to include both post and pages makes no difference)
What is the correct way to name the template files?
Step-by-step reproduction instructions
You can test this by installing a theme from the theme directory called "Aino", which has several templates.
Screenshots, screen recording, code snippet
No response
Environment info
WordPress 5.9-RC2-52567 With and without Gutenberg current trunk Windows 10. Chrome.
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