gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Site Editor Add Template action includes existing templates

Open bobbingwide opened this issue 4 years ago • 2 comments

Description

In the Site Editor beta, when you choose add template it should

  • list templates that don't already exist
  • and not templates that do exist
  • regardless of where they already exist - theme or database.

Step-by-step reproduction instructions

Set up steps

  1. Create an archive template if one doesn't already exist
  2. Export the template to the theme's block-templates folder
  3. Delete the template from the database.

Site Editor steps

  1. Open Site Editor
  2. Toggle Navigation
  3. Choose Template Add template icon
  4. See the List - mine showed Front page, Page and Archive
  5. While the popup is open hover over one of the listed templates
  6. See the template preview

Expected behaviour

In the Add template popup:

  • Don't list templates do already exist in the theme's files
  • Do list templates that haven't been created: eg Author

In the Templates list:

  • Include templates that only exist in the theme's files
  • as well as templates that have been customised

At some time in the future take into account child themes.

Actual behaviour

Templates that were already in the theme files were listed.

Screenshots or screen recording (optional)

image

Code snippet (optional)

WordPress information

  • WordPress version: 5.7.1
  • Gutenberg version: 10.5.4
  • Are all plugins except Gutenberg deactivated? No
  • Are you using a default theme (e.g. Twenty Twenty-One)? No - using ThisIs

Device information

  • Device: Desktop
  • Operating system: Windows 10
  • Browser: Chrome

bobbingwide avatar May 06 '21 18:05 bobbingwide

@bobbingwide is this still happening? Stumbled on this and had to check in :)

annezazu avatar Oct 28 '22 03:10 annezazu

@bobbingwide just checking in. There have been a number of significant changes to the Site Editor since this issue was submitted. I am not able to replicate the issue you highlighted above using WordPress 6.1.1 and the latest version of Gutenberg. Are you able to confirm? Thanks!

image

ndiego avatar Jan 31 '23 16:01 ndiego