Home Forums General Issues Saved Drafts not displaying custom fields


Saved Drafts not displaying custom fields

    • NewJenk

    • February 6, 2017 at 8:52 am

    I too am having this issue.

    And it is driving me mad.

    • Elliot

    • February 6, 2017 at 9:19 am

    Hi @newjenk

    Can you please submit a new support ticket with as much info about the issue as possible?

    It would be great to get some WP + ftp details too so we can further debug the issue.
    Please also try to replicate the issue on a blank install so we can rule out any 3rd party theme / plugin conflicts

    • NewJenk

    • February 8, 2017 at 3:22 am

    Hi @elliot,

    I’ve tested it on three sites I’m currently working on and all are exhibiting the same behaviour.

    I’ll create a fresh install and write up a detailed explanation of the problem when I get time over the next few days.


    • fox

    • February 17, 2017 at 9:47 am

    @elliot I’m sure you’re working on this again, but the issue has come back again, like other here.
    Running ACFPro version 5.5.7.

    This isn’t critical, since it’s only on the drafts but I do have a custom post type that is all custom fields. So, proofreading is a little difficult (not possible 😉 as a draft now.


  • Hi Elliot,

    I’ve just created a support ticket – it’s titled ‘Newly Created and Draft Pages Not Displaying Custom Fields on Preview’.


    • banesto

    • March 30, 2018 at 2:02 am

    Maybe this helps: I tried to dig through this problem and in my case I create post using acf/pre_save_post. I save post as a draft. The thing is all the metadata is saved for draft post, but when I try to see preview, WordPress actually shows me the first revision, but that revision does not have any metadata attached unless I open post in admin panel and press ‘Save Draft’ or keep it open long enough to trigger auto-save. It seems that WordPress’ hook wp_insert_post does not handle creating metadata for first revision.

  • I was wondering what the status of this issue is. It’s still not working, is this under development?

    Thanks in advance!

    • room34

    • February 13, 2019 at 9:41 am

    I’ve been using ACF for many years on dozens of sites, and have never encountered this problem until now. I am running the latest version of ACF (5.7.11) with the latest version of WordPress (5.0.3). This is only affecting one particular site, that I’m aware of.

    The site has been having a few other issues recently, as it’s on a server that’s still running Ubuntu 14.04, and I just had to manually update PHP to 7.2 from 5.5 for some unrelated reasons. I think it’s possible I missed something in the update that is causing this issue, but it’s curious that it’s exactly what’s described here — if a post is in draft mode, the custom fields don’t show on preview, even though they do save on the back end, and if you schedule or publish the same post, they do appear on the front end. Then if you switch it back to draft, they go away again.

    I should note that I did set up a brand new VPS today running Ubuntu 18.04 with all available updates, migrated the site over to that server, and the problem persisted. (So it’s probably not directly about the PHP 7.2 patch I did on the old server — but perhaps related to some database cruft that came along for the ride.)

    • room34

    • February 13, 2019 at 10:03 am

    UPDATE: I just rolled the site back to using ACF 5.7.10, and the preview works. So it appears to be the result of a change in version 5.7.11. I’m doing a diff between the two versions to try to figure out what changed that might be relevant, but I haven’t scrutinized the ACF source code before and I’m not sure what to look for.

    • Elliot

    • February 13, 2019 at 1:11 pm


    Thanks for the info,
    Elliot here – ACF dev.

    My apologies for the issues in version 5.7.11.
    I am confident we have found and fixed the issue.

    Can you please re-download the ACF PRO plugin files and test the issue?

    An easy way to re-download is to edit the main acf.php plugin file and change the version number ‘5.7.11’ down to ‘5.7.10’
    – please note the version number appears twice in this file and both will need to be changed
    – after this change is made, please update the plugin as per normal and it will update to 5.7.11 (including the new fix)

    • room34

    • February 14, 2019 at 9:03 am

    Unfortunately this did not resolve the issue for me. I had already manually rolled back to 5.7.10, so I just ran the available 5.7.11 update, and the problem returned. (I have now rolled back to 5.7.10 again.)

    • Elliot

    • February 14, 2019 at 10:02 am

    @room34 Thanks for the update. Can you please open a new support ticket via the following link, and we can work together to diagnose the issue:

    • Joe

    • February 21, 2019 at 9:09 pm

    I’m also getting this on 5.7.11 and 5.7.12. Calling the function get_field() just returns a serialised array on draft previews.

    • Elliot

    • February 22, 2019 at 10:23 am

    @hodephinitely Thanks for the report. Sorry to quote myself again, but can you please open a new support ticket via the following link, and we can work together to diagnose the issue:

  • I just ran in to this problem!

    Could not figure out what was causing it but when i remove preview=true from the uri it works again.

    My dirty hack is to add the following to functions.php (not sure what else this breaks)

  • Hi @elliot,
    this is still an issue for us in the most current version (5.8.9).

    I was able to narrow it down to acf_get_valid_post_id() which seems to return a wrong post_id in these preview cases – don’t know whether the returned post_id is of a revision? I don’t quite get everything that’s going on, tbh.

    Could you please have a look? Would be great to get this working again. Our clients are asking for it, they would like to preview drafts…

    Cheers mate 😉

Viewing 16 posts - 26 through 41 (of 41 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.