Home Forums Backend Issues (wp-admin) All fields randomly disappearing in the backend Reply To: All fields randomly disappearing in the backend

  • Great news, I did some findings. At least just spotted where the problem is coming from and how to patch it.

    I did check acf-field-group-functions.php as you suggested, and after tracing the errors through the code I found out that when the fields are not showing up, $post_ids in acf_get_raw_field_groups() is returning an empty array, then the if statement at line 360 fails (see below).

    So changing the if statement like this did the trick
    if( $post_ids === false || empty($post_ids) ) {

    I’m not sure how wp_cache works, but I’ve read that “All cache-related work is made using instance of the WP_Object_Cache class. The cache data is saved to the memory (server RAM) during the page generation. But if you’re using a persistent cache plugin, the cache can be stored among page visits for a longer amount of time.”

    The cache plugin (FlyingPress) is currently deactivated when testing this, but it seems that the hosting (it’s hosting, from automattic) has memcache activated by default. This is what they told me regarding memcache:

    “Memcache cannot be disabled, it’s part of site infrastructure here and there’s no way to turn it off. It’s not possible to turn off memcache in our hosting environment (and honestly, I’m not sure why you would since it’s common on websites of all sorts, and I’ve never personally seen an issue with that)”

    TBH I’m not sure about these comments as I’m no cache expert by any means. But having this issue in mind and that this may be the case for other hosting platforms, is my solution feasible for future plugin updates?

    If not, how would you suggest fixing this permanently on my end? As future plugin updates will overwrite this line of code.