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

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

Closed
carolinan opened this issue Jun 12, 2020 · 3 comments · Fixed by #23591
Closed

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

carolinan opened this issue Jun 12, 2020 · 3 comments · Fixed by #23591
Assignees
Labels
[Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@carolinan
Copy link
Contributor

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
@kjellr kjellr added the [Type] Bug An existing feature does not function as intended label Jun 30, 2020
@kjellr
Copy link
Contributor

kjellr commented Jun 30, 2020

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?

@jffng
Copy link
Contributor

jffng commented Jun 30, 2020

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.

@epiqueras
Copy link
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
Labels
[Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants