Skip to content

Edit site: Changes to html files are not reflected in the site editor. #23106

Closed

Description

@carolinan

Describe the bug

If I make changes to a html file that is a template or template part,
those changes are shown correctly on the front, but the site editor still
shows the original unchanged content and markup.

-I made sure that no templates or template parts are saved.
-Clearing browser cache does not help.
-Testing a different browser did not help.
-It makes no different if I am viewing the entire page or select a single template part in the editor.

-Changing themes does not help:
Make a change to theme A, switch to theme B.
Make changes to theme theme B, and change back to theme A.
The site editor will show the old content and markup for theme A.

To reproduce
Steps to reproduce the behavior:

  1. Install Gutenberg and enable full site editing
  2. Install and activate a full site editing theme
  3. Make sure there are no templates or template parts saved.
  4. Open the site editor to check the original theme.
  5. Open any theme html file and make any change.
  6. View the theme on the front to see that the change is applied.
  7. Open the site editor and see that the change is not applied.

Expected behavior
I expect changes to html files to be applied in the site editor.

Editor version (please complete the following information):

  • WordPress version: 5.4.2.
  • Gutenberg Version 8.3.0

Desktop (please complete the following information):

  • OS: Win 10
  • Chrome Version 83.0.4103.97
  • Firefox 77.0.1

Activity

  1. added
    [Type] Bug
    on Jun 30, 2020
  2. kjellr commented on Jun 30, 2020

    @kjellr
    Contributor

    Just noting that I can reproduce on master: Manual edits to a theme's block-template-part HTML files do not get reflected in the full-site editor, even after a few hard-refreshes. @epiqueras, do you have any idea what the problem might be?

  3. jffng commented on Jun 30, 2020

    @jffng
    Contributor

    I was able to get the site editor to reflect manual changes to the HTML files by doing the following:

    1. Make a change in the site editor, and save it (Update Design)
    2. in wp-admin, go to Appearance > Templates, Appearance > Template Parts and permanently delete all the posts saved there.
    3. Go back to the site editor and see the manual template part changes reflected

    If I had to guess, this behavior has something to do with the template part creation and resolution logic.

  4. added
    [Status] In Progress
    on Jun 30, 2020
  5. epiqueras commented on Jun 30, 2020

    @epiqueras
    Contributor

    This is only a problem with template parts, not templates from what I see.

    Here is the fix: #23591.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

[Status] In Progress[Type] Bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions