-
Notifications
You must be signed in to change notification settings - Fork 182
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 mode does not run a query to preview when first used on the page #926
Comments
Hey! Thanks for the report. It's expected that the preview call shouldn't happen until you switch - but it definitely should when you switch, unless we already have a copy of that block preloaded, which is only possible when the fields are exactly the same. We're currently working on a significant refactor of all this logic - please stay tuned for a beta of that coming later this year - but we'll be test this as part of that to ensure we've solve this issue. Thanks! |
This is even on a fresh page, only block on the page and nothing particularly special. So didn't copy the block, no other blocks on the page interfering, etc. It does work as expected once I edit a field in 'preview' mode. It's just for some reason this very first time you add it to the page if you don't interact with preview mode fields you only use edit and flip. As you mentioned, I do not expect the preview call to fire until I click the 'preview' icon - but it doesn't do that so the experience is totally broken. Any chance this will get resolved before the refactor? With how narrow the sidebar is with WordPress 6.6 I've been encouraging content editors to use the 'edit' mode now instead of 'preview'. So this will become a huge problem for content editors who are moving into edit mode as their new way to edit things. |
Hey, Probably not - we're already pretty deep in the refactor, and currently aren't planning another release before then. We've not seen this issue or heard of this issue before though, so it could be something that requires other conditions to trigger. Does the block in auto mode work? |
Ahh this only happens when the mode is set to |
Describe the bug
The first time an ACF block is added to the page and the 'Edit' mode is used, it does not run an admin-ajax call with
query[preview]: true
when you change from edit mode to preview mode consistently. If you use thepreview
mode fields then switch back and forth between edit / preview then the admin-ajax call works as expected. This means that when you edit or add content to your ACF fields in edit mode and switch to preview mode, the dynamic block output does not recognize that you've changed the content. It either shows stale or outdated information because thequery[preview]
doesn't get fired.To Reproduce
Steps to reproduce the behavior:
edit
modepreview
modeNetwork
tab, there are no admin-ajax.php API calls with thequery[preview]: true
property. The frontend of the block does not update because the preview query isn't ran.edit
mode and make changes. Not that now when you switch back and forth from edit -> preview it does run the proper admin-ajax.php to update the block.Expected behavior
It seems as though the first time you add a block to the page, you can edit content in the
edit
mode and switch to thepreview
mode and your content is never truly updated in the correct way. You can switch back and forth as many times and still won't work. Once you make a change inpreview
mode, then changing content inedit
mode works as you'd expect.Version Information:
The text was updated successfully, but these errors were encountered: