Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Header block content fails to save/update and display on front-end. #26

Closed
chriswallace opened this issue Dec 9, 2018 · 4 comments
Closed
Labels
[block] Header bug Something isn't working

Comments

@chriswallace
Copy link

Expected Behavior

Title, description, and button text should all be editable and update on the front end after saving the page.

Actual Behavior

When creating a header block, the text content sometimes is impossible to edit or sometimes can be edited but fails to update and display properly on the front-end.

Steps to Reproduce the Problem

  1. Add a Header block to a Gutenberg page.
  2. Edit the text in the title, description or button.
  3. Save the page.
  4. View the front-end.

Specifications

  • Browser: Chrome 71.0.3578.80
  • Platform: Mac OS X Mojave
@jaymcp jaymcp added the bug Something isn't working label Dec 10, 2018
@jaymcp
Copy link
Member

jaymcp commented Dec 10, 2018

Hi @chriswallace

Thanks for your report. There is a workaround for this whilst we're working on a fix.
If it fails to save correctly, do the following:

  1. Cut all of the text out of the content field (screenshot below)
    • Update other fields as required
  2. Save the page
  3. Paste the content back into the field
  4. Re-save

This should do the trick.

Thanks

@jaymcp
Copy link
Member

jaymcp commented Dec 12, 2018

Hey @chriswallace

It appears to be caused by a bug in WP core; see this ticket on trac. Were you using WP v4 or WP v5 when you encountered this issue? The bug was patched in the 5.0 release.

Thanks

@chriswallace
Copy link
Author

chriswallace commented Dec 12, 2018 via email

jrmd added a commit that referenced this issue Dec 17, 2018
@jrmd
Copy link
Member

jrmd commented Dec 17, 2018

Hi @chriswallace

As I understand the failure to update error should've been fixed within WordPress 5.0, currently I'm struggling to recreate the issue locally to check the network requests. If at all possible when using this could you keep dev tools open on the network request and look for the post request that points to yourdomain.com/wp-json/wp/v2/posts and see what the response is. This will further help me understand whats causing this issue, and whether I need to file another issue with the Gutenberg editor.

Regarding being unable to edit the content sometimes, I have created a fix and filed a pull request.

Thanks,
Jerome

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
[block] Header bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants