Skip to content

Template Part: Reloading the template part editor within the post editor throws an error #72733

@andrewserong

Description

@andrewserong

Description

If you have edited a template part (so it has an id) and you go to edit that template part from within the post editor, and then go to reload the page, it shows an error message that you do not have permission to edit the post:

2025-10-28.15.14.20.mp4

Step-by-step reproduction instructions

  1. Go to edit an existing post or page
  2. With template preview mode on, double click on the header area and select to edit the template
  3. Click on the header and select Edit to go to the focused view of the template part
  4. Note how in the URL, the id is updated to the ID of the template part
  5. Reload the editor
  6. See the error message

Instead, what would be great is for the user to be dropped back into editing the template part as they were (including with the Back button to get back to where they were). Failing that, being returned to the post you were originally editing might be an acceptable fallback?

Screenshots, screen recording, code snippet

No response

Environment info

  • Gutenberg trunk

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

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] Template PartAffects the Template Parts Block[Package] Edit Post/packages/edit-post[Type] BugAn existing feature does not function as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions