You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Preview fails to display edits on published posts when metaboxes are visible in Gutenberg #12617
The preview button in the Gutenberg editor in Wordpress 5 RC3 doesn't display unsaved edits.
Reproduced by creating and saving a page, then edit the page and click preview. The preview page only shows the original page and not the additional edits.
Reacted by ͏ ͏, Garrett Hyder, Klemens Zleptnig, Sybre Waaijer, ktmn, Andrei Draganescu, Nilambar Sharma, Joshua van Boxtel, Sam Cross, Brian Kennedy and 7 more
I tested both.
The initial test was on a client site where I was doing a trial install of WordPress 5 in which I attempted to edit an existing page. Edits on that page didn't show up in preview. The only way to see then was to save the page.
As a more objective test I then created and saved a new page, then went back and edited the page. The edit didn't show up in preview. (This test was in a page not a post - I’ve not tried the test for a post. Not sure if that would make a difference though)
Fro what I can see of your recording you’re doing a preview of the initial page prior to saving which is different from what I encountered.
Hope that helps clarify.
On 5 Dec 2018, at 16:30, Sheri Bigelow ***@***.***> wrote:
I did a quick test with WordPress 5.0-RC3-43967 and do not see the same problem.
Can you tell me a little more about your testing?
Are you testing previews of a draft or a published post?
Did you press "Preview" each time or save and try reloading a previously opened preview?
Are you making changes to the post content or are you making changes to things like post settings and meta data?
Would it be possible for you to provide a short list of exact testing steps?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
Thanks for the clarification! There are actually more scenarios than you might think if you consider autosaves vs "Save Draft" and draft vs published and post vs page and all the combinations thereof. My test had 3 cases: new post -> preview, edit draft -> preview, save & publish then edit then preview.
Sounds like your testing steps are:
Create page.
Save.
Go to Pages list.
Re-open page.
Make an edit to the text.
Click Preview.
Testing note: since publishing wasn't mentioned, try with a draft as well as a published page.
I have a previously published page (as it happens created before the site was updated to Wordpress 5) that now requires an update.
Having made the edit, if I click Preview the update is not displayed. It's therefore not possible to check the progress of a set up updates on the page without publishing the page.
That is not a safe way to edit the content and therefore renders the new editor unusable in this real world scenario.
I ran another test after upgrading a different site to WordPress 5.0 and I can still see previews working normally. I tested with Firefox 63.0.3 on macOS 10.13.6 and I tried with a draft as well as with a previously published post. Please have a look and let me know if I'm still missing anything from my testing steps!
5.0 was just released, so I suggest updating and uninstalling the Gutenberg plugin if you have it (you don't need it any more with 5.0). If you're still having trouble after that, I would suggest checking for a plugin or theme conflict by temporarily disabling all plugins and switching to the default theme as a test to see if the problem still happens under those conditions. If your test setup was already like that, we'll need to try to think of what else could be the source of the trouble in your case.
Sometimes OS or browser version matter for cases like this. I tested with a Mac, and if you let me know you're OS and browser versions, I can test again from a more similar setup to you.
5.0 was just released, so I suggest updating and uninstalling the Gutenberg plugin if you have it (you don't need it any more with 5.0). If you're still having trouble after that, I would suggest checking for a plugin or theme conflict by temporarily disabling all plugins and switching to the default theme as a test to see if the problem still happens under those conditions. If your test setup was already like that, we'll need to try to think of what else could be the source of the trouble in your case.
Repeating the test with 5.0, without plugins and using a default theme made no difference to the outcome. I am still not seeing the edits when I click the preview button.
For info I'm using Chrome 70.0.3538.110 and MacOS 10.13.6
In fact that sheds additional light on this and I can confirm the findings in that ticket. Initially the preview button doesn't display the edited contents as I reported. But if you wait 5-10 seconds and then reload the preview page then it does display the edited content.
So as soup-bowl reported in #127171 - it's not completely broken. But in my view just broken enough to make it unusable.
I am experiencing the exact same behavior as @davidAIS. I don't think this started right away after 5, maybe the 5.0.1 update did it. Refreshing the preview after a few seconds does indeed work.
I am experiencing the exact same issue. I am using chrome, and windows 10. I set up a staging site, deactivated all plugins, and activated the default theme. I edit a page, that is published. Then I press preview and it does not show my edits. If I wait and refresh it will show my edits, or if I publish the post, it will also display my edits.
We are still having the issue, just going to add my bit as slightly weird toggling thing going on where it toggles the content on and off, but long and short is that preview is not working for published pages using advanced custom fields, but is working for draft pages:
Using:
Advanced Custom Fields Pro 5.8.1
WordPress 5.2.1
Steps:
Clicking preview on a published page will show no content (content is in ACF, no WordPress default blocks used), header and footer does show.
Clicking preview again will bring the content from ACF this time but without content changes.
Clicking preview again will then show the page to have no content. Like it toggles the ACF content on and off.
Checked that the URL is same (?preview_id=27&preview_nonce=abd991463b&preview=true) and is.
It works fine for pages in draft mode.
Reacted by amanda-t, Andrea Brunato, Ennuicat, Fabio Marzocca, Rory Ashford-Bentley and Tran Thai Hoang
Hi @altescape, I was unable to reproduce on a published page using a custom field. Would you be able to create a separate issue for this as it seems like the problem you're having is different to the original report (and this issue is now closed).
content is in ACF, no WordPress default blocks used
I'm not sure what this means, it'd be good if you could add some extra steps about how you create the post when creating a separate issue.
This has still occurred for me, although not every time I edit a published post. However, selecting "Preview" for the second or third time has shown the edited version.
@altescape Having exactly the same problem (tested ACF 5.8.1 and Wordpress 5.2.1). Did you find a solution or create a new issue somewhere? I already contacted the ACF developers but they could not reproduce the issue (they said).
Preview saves a revision which erases all ACF fields(!), so - of course - it will show an empty page. This can be seen in the page revisions.
Using preview on unpublished posts or pages works as expected, just if you try to preview an already published page, it will have all ACF fields erased
Autosave will also remove all ACF fields content(!)
I know this issue is closed, but it could very well be that these problems are somehow related. Any help is appreciated.
Reacted by Rogério Moreira, Michael Watts and Andrea Brunato
@Bt4ok -- the code was for an earlier version of Wordpress -- the issue with post previews and metaboxes that is described in this thread was resolved quite some time ago with a Wordpress update. If you are having a problem now you should report an open a new issue. (If you'll note, this thread was marked closed)
@Bt4ok -- the code was for an earlier version of Wordpress -- the issue with post previews and metaboxes that is described in this thread was resolved quite some time ago with a Wordpress update. If you are having a problem now you should report an open a new issue. (If you'll note, this thread was marked closed)
Yes still have the problem
Clear wp install 5.3.2
Built-in Gutenberg
ACF 5.8.7
Problem is still present
No preview updates of changes in advanced custom fields forms if post is published.
Tried to install gutenberg as plugin - received the same problem.
Also trough time preview page get empty fields. 1click -preview - fields are empty, 2nd click - filled (saved post version without changes), 3rd-emptry, 4th - filled (without changes).
Tested on built in twentytwenty theme.
May be need to rollback for previous wp version or acf?
This preview issue was solved for me months ago, but recently I've been experiencing this:
Auto-saving makes the preview window refresh itself continuously and frequently, which is really frustrating when one is reading through the text to see if everything is ok. After each refresh, the page is returned to the top, and one has to scroll back to the place that one was reading.
Thank you. The problem was resolved by rollback to wp 5.0 core version. Preview working as expected for drafts and published posts (including changes in ACF fields), but ACF fields automatically saved when I press the "preview" button.
Just to be sure: is the constant realoading of the preview window, absent any modifications, "working as expected"? It really makes concentrated reading difficult.
My english isn't very good, sorry.
I mean. Rolled back to wp 5.0. Entered post edit page, made some changes in acf fields or in the content section. Press "preview" and see all made changes! No matter is post published or is draft.
Only a problem is if make some changes in acf fields and press "preview" - after pressing the button I get updated (saved) post with my last changes in acf forms. Changes in content presented in "preview" mode but not saved until I press "update".
For example. Open post for edit -> make some changes to ACF fields and to post content (or title, etc.), press preview - I see all changes (acf+content). Close edit post page without pressing update but get new version post with old content and changed acf. If don't close post edit page without saving and press update, get updated post with all changes in acf and content.
Activity
designsimply commentedon Dec 5, 2018
I did a quick test with WordPress 5.0-RC3-43967 and do not see the same problem.
Can you tell me a little more about your testing?
Are you testing previews of a draft or a published post?
Did you press "Preview" each time or save and try reloading a previously opened preview?
Are you making changes to the post content or are you making changes to things like post settings and meta data?
Would it be possible for you to provide a short list of exact testing steps?
davidAIS commentedon Dec 6, 2018
designsimply commentedon Dec 6, 2018
Thanks for the clarification! There are actually more scenarios than you might think if you consider autosaves vs "Save Draft" and draft vs published and post vs page and all the combinations thereof. My test had 3 cases: new post -> preview, edit draft -> preview, save & publish then edit then preview.
Sounds like your testing steps are:
Testing note: since publishing wasn't mentioned, try with a draft as well as a published page.
davidAIS commentedon Dec 6, 2018
I'm sure there are lots of scenarios.
This is mine.
I have a previously published page (as it happens created before the site was updated to Wordpress 5) that now requires an update.
Having made the edit, if I click Preview the update is not displayed. It's therefore not possible to check the progress of a set up updates on the page without publishing the page.
That is not a safe way to edit the content and therefore renders the new editor unusable in this real world scenario.
designsimply commentedon Dec 6, 2018
I ran another test after upgrading a different site to WordPress 5.0 and I can still see previews working normally. I tested with Firefox 63.0.3 on macOS 10.13.6 and I tried with a draft as well as with a previously published post. Please have a look and let me know if I'm still missing anything from my testing steps!
5.0 was just released, so I suggest updating and uninstalling the Gutenberg plugin if you have it (you don't need it any more with 5.0). If you're still having trouble after that, I would suggest checking for a plugin or theme conflict by temporarily disabling all plugins and switching to the default theme as a test to see if the problem still happens under those conditions. If your test setup was already like that, we'll need to try to think of what else could be the source of the trouble in your case.
Sometimes OS or browser version matter for cases like this. I tested with a Mac, and if you let me know you're OS and browser versions, I can test again from a more similar setup to you.
designsimply commentedon Dec 12, 2018
Thanks @slimmilkduds!
I also just closed #12717 as a duplicate and wanted to note it also includes a video.
davidAIS commentedon Dec 12, 2018
Re:
Repeating the test with 5.0, without plugins and using a default theme made no difference to the outcome. I am still not seeing the edits when I click the preview button.
For info I'm using Chrome 70.0.3538.110 and MacOS 10.13.6
I note that you've closed ticket #12717
In fact that sheds additional light on this and I can confirm the findings in that ticket. Initially the preview button doesn't display the edited contents as I reported. But if you wait 5-10 seconds and then reload the preview page then it does display the edited content.
So as soup-bowl reported in #127171 - it's not completely broken. But in my view just broken enough to make it unusable.
xy0 commentedon Dec 13, 2018
I am experiencing the exact same behavior as @davidAIS. I don't think this started right away after 5, maybe the 5.0.1 update did it. Refreshing the preview after a few seconds does indeed work.
amycmcc commentedon Dec 14, 2018
I am experiencing the exact same issue. I am using chrome, and windows 10. I set up a staging site, deactivated all plugins, and activated the default theme. I edit a page, that is published. Then I press preview and it does not show my edits. If I wait and refresh it will show my edits, or if I publish the post, it will also display my edits.
132 remaining items
earnjam commentedon May 3, 2019
@harmancheema93 have you tested this with the latest version of the Gutenberg plugin, or with the WordPress 5.2 release candidate?
The fix for this has been merged, but will not be released in WordPress core until 5.2 comes out next week.
jg314 commentedon May 30, 2019
In case this is helpful to anyone, updating to WordPress 5.2.1 fixed this issue for us.
mj-watts commentedon Jun 4, 2019
We are still having the issue, just going to add my bit as slightly weird toggling thing going on where it toggles the content on and off, but long and short is that preview is not working for published pages using advanced custom fields, but is working for draft pages:
Using:
Steps:
Checked that the URL is same (?preview_id=27&preview_nonce=abd991463b&preview=true) and is.
It works fine for pages in draft mode.
talldan commentedon Jun 5, 2019
Hi @altescape, I was unable to reproduce on a published page using a custom field. Would you be able to create a separate issue for this as it seems like the problem you're having is different to the original report (and this issue is now closed).
I'm not sure what this means, it'd be good if you could add some extra steps about how you create the post when creating a separate issue.
Thanks.
vesaraiskila commentedon Jun 5, 2019
This has still occurred for me, although not every time I edit a published post. However, selecting "Preview" for the second or third time has shown the edited version.
kaij commentedon Jun 10, 2019
@altescape Having exactly the same problem (tested ACF 5.8.1 and Wordpress 5.2.1). Did you find a solution or create a new issue somewhere? I already contacted the ACF developers but they could not reproduce the issue (they said).
I know this issue is closed, but it could very well be that these problems are somehow related. Any help is appreciated.
mj-watts commentedon Jun 11, 2019
@kaij Hi,
I opened another issue #16006 see my description there
Bt4ok commentedon Dec 25, 2019
Where did you add the code? cause I'm trying to insert into my theme functions.php but nothing happened
Armarsh commentedon Dec 26, 2019
@Bt4ok -- the code was for an earlier version of Wordpress -- the issue with post previews and metaboxes that is described in this thread was resolved quite some time ago with a Wordpress update. If you are having a problem now you should report an open a new issue. (If you'll note, this thread was marked closed)
Bt4ok commentedon Dec 26, 2019
Yes still have the problem
Clear wp install 5.3.2
Built-in Gutenberg
ACF 5.8.7
Problem is still present
No preview updates of changes in advanced custom fields forms if post is published.
Tried to install gutenberg as plugin - received the same problem.
Also trough time preview page get empty fields. 1click -preview - fields are empty, 2nd click - filled (saved post version without changes), 3rd-emptry, 4th - filled (without changes).
Tested on built in twentytwenty theme.
May be need to rollback for previous wp version or acf?
vesaraiskila commentedon Dec 26, 2019
This preview issue was solved for me months ago, but recently I've been experiencing this:
Auto-saving makes the preview window refresh itself continuously and frequently, which is really frustrating when one is reading through the text to see if everything is ok. After each refresh, the page is returned to the top, and one has to scroll back to the place that one was reading.
Bt4ok commentedon Dec 26, 2019
Thank you. The problem was resolved by rollback to wp 5.0 core version. Preview working as expected for drafts and published posts (including changes in ACF fields), but ACF fields automatically saved when I press the "preview" button.
vesaraiskila commentedon Dec 26, 2019
Just to be sure: is the constant realoading of the preview window, absent any modifications, "working as expected"? It really makes concentrated reading difficult.
Bt4ok commentedon Dec 26, 2019
My english isn't very good, sorry.
I mean. Rolled back to wp 5.0. Entered post edit page, made some changes in acf fields or in the content section. Press "preview" and see all made changes! No matter is post published or is draft.
Only a problem is if make some changes in acf fields and press "preview" - after pressing the button I get updated (saved) post with my last changes in acf forms. Changes in content presented in "preview" mode but not saved until I press "update".
For example. Open post for edit -> make some changes to ACF fields and to post content (or title, etc.), press preview - I see all changes (acf+content). Close edit post page without pressing update but get new version post with old content and changed acf. If don't close post edit page without saving and press update, get updated post with all changes in acf and content.
I hope, my answer is understandable
hoangemini commentedon May 27, 2020
I have the same question