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

Default page and single post templates can be renamed in the template editor #40876

Closed
carolinan opened this issue May 6, 2022 · 1 comment · Fixed by #40881
Closed

Default page and single post templates can be renamed in the template editor #40876

carolinan opened this issue May 6, 2022 · 1 comment · Fixed by #40881
Assignees
Labels
[Feature] Template Editing Mode Related to the template editor available in the Block Editor [Type] Bug An existing feature does not function as intended

Comments

@carolinan
Copy link
Contributor

Description

I am not sure if this is a bug, but it was unexpected for me.

While testing #40830, I noticed that if I activate a block theme that does not have a singular, post or page template, and I use the Site editor to create a page or a single template, then those templates can be renamed in the template editor.
(They can not be renamed when opened in the site editor.)

To clarify, these page templates are not custom page templates created via Block editor > Templates > New, and assigned to specific posts or pages, these are the default templates. The page (and soon , post) page template are the only default templates that can be renamed this way, since they are the only default templates that can be edited in the template editor.

Step-by-step reproduction instructions

  1. Activate a block theme that does not have a template for pages. For example https://wordpress.org/themes/miniblock-ooak/
  2. Open the Site Editor, template list, and select "Add new" and then "page".
  3. Create a new page in the block editor.
  4. Confirm that the default template is the page template you just created and not "index"
  5. Select the Edit link in the Template section to open the template editor
  6. Click on the template name at the top center above the content area to open the template options modal.
  7. Change the template name in the input, and select Update (save).

Optionally create a second, new page and see that the renamed template is used as the default.

Screenshots, screen recording, code snippet

No response

Environment info

Gutenberg current trunk or 13.1.0, WordPress 6.0 Rc1.
Beta tester plugin

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

@carolinan carolinan added [Feature] Template Editing Mode Related to the template editor available in the Block Editor [Type] Feedback Issues that relate purely to feedback on a feature that isn't necessarily actionable labels May 6, 2022
@Mamaduka
Copy link
Member

Mamaduka commented May 6, 2022

This is a bug. Changing template name for built-in template should be disabled.

I will create PR shortly.

@Mamaduka Mamaduka added [Type] Bug An existing feature does not function as intended and removed [Type] Feedback Issues that relate purely to feedback on a feature that isn't necessarily actionable labels May 6, 2022
@Mamaduka Mamaduka self-assigned this May 6, 2022
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label May 6, 2022
@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Template Editing Mode Related to the template editor available in the Block Editor [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants