AdvancedCustomFields / AdvancedCustomFields/acf
Block editor is automatically updating existing posts
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 945
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
When editing an existing blog post with the block editor, once each minute the block editor will update the post (taking changes live -- as if clicking the "Update" button), rather than just auto-saving a revision.
We've narrowed it down to ACF 5.9.0 (both free and pro). We first encountered this on a client site, and then on a second live site. I've recreated the problem on a development site running WP 5.5, Twenty Twenty, and with ACF as the only active plugin.
The live sites were running 5.4.2, so this isn't just a 5.5 issue.
Step to duplicate:
- Edit a published post in the block editor.
- Make some changes to the content.
- Wait ~60 seconds with the editor open.
- When admin-ajax.php triggers, it will also update the post and the changes will go live.
If you watch the request in the Devtools Network tab, you'll see admin-ajax.php appear, and at the same time a second URL to https://domain.com/wp-json/wp/v2/posts/1234?_locale=user.
If no changes are made after that and you just let the editor sit there, admin-ajax.php will keep triggering every minute, but it won't update again. If you then make some more changes, on the next heartbeat it'll update again.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue by editing a published post in the block editor and watching DevTools Network for the recurring admin-ajax.php request and the WordPress REST request to /wp-json/wp/v2/posts/1234?_locale=user. Compare the behavior on WordPress 5.4.2 or 5.5 with ACF 5.9.0 as the only active plugin. Done means heartbeat requests save revisions without publishing unsaved changes until the editor's Update action is used.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- backend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100