Home Forums ACF PRO Bug with repeater & private pages Reply To: Bug with repeater & private pages

  • I’m not sure what was causing my problem, but I can confirm that it is not ACF.

    What I did was, I basically scrapped the site. It’s only a test site and I can do that. I deleted all the tables and reinstalled WP. So I have a fresh install, using 2016 and only ACF active. Everything is working the way that it should be, even with private posts.

    It has been a long time since I’ve dumped this site and started clean. It’s where I build and work on plugins. I have 63 plugins on this site and they’ve all been active at one time or another, so I’m guessing when I say that I think something in one of these plugins cause the issue with private posts. So I’m also guessing that you may be seeing a similar situation.

    For some reason, when ACF tries to get the current post ID something is causing WP to return no value.

    It would probably be easier to tell me what plugins you’ve had installed than for me to list out all 63 of the ones I’ve used in the past. However, I did a search for various forms of not being about to see private posts and BBPress came up in quite a few of those searches and I have had BBPress installed on the test site.

    Another thing you might to is, just before you try to get the acf value for the private post try adding the following. This is how ACF attempts to get the current post ID.

    $object = get_queried_object();
    echo '<pre>'; print_r($object); echo '</pre>';

    See if you get anything on the private post where you’re not getting a value.