skip to Main Content

I have been working with wp for a while now but just ran into a bug, that I can not fix with the information found in the internet.

I was editing a acf field. When I was finished writing into one of the fields, I mistakenly pressed enter. The page started reloading and all fields were gone. When going to the frontend, everything is displayed properly.

I tried to reactivate my ACF fields via the screen options what did not work. I inserted some code lines into my functions.php. or into the input.css because I thought maybe the right checkbox for the ACF fields to be displayed was missing. Nothing helped. Is there any other way to fix this issue.

thx in advance
greetings

2

Answers


  1. I just come through this problem : for one of my field group, the fields box just disappeared at some point and I had no way no retrieve it thanks to the WordPress Admin interface.

    I don’t know the reason why, but it appears that in my case, ACF registered some "unwanted" user meta in my database. (how is the question)

    If you look inside your DB at the usermeta table content you will probably find some ACF entries like : metaboxhidden_acf-field-group or closedpostboxes_acf-field-group and maybe others…

    The one causing trouble for me was meta-box-order_acf-field-group : I simply deleted the entry (but you can try editing it to remove the reference of your "lost" box) and the problem was solved.

    Maybe too late to help you, but hope it can still help someone !

    ##EDIT##

    Seems I may have a clue about how the box disappeared

    Steps to reproduce :

    1. Create a field group and associate it with whatever post type you have
    2. Go create a whatever post (note : the Gutenberg editor is active on this edit page)
    3. You should find your fields group at the bottom of the page
    4. Try to move the group meta box above the Gutenberg editor (without success because it seems not possible)
    5. Save your post
    6. Come back to the edit page of the field group and refresh it
    7. Tadaaa ! the fields group box is not available anymore
    8. Go to your database, the usermeata table, you will find the entry causing the trouble again : meta-box-order_acf-field-group = a:3:{s:4:"side";s:32:"submitdiv,acf-field-group-fields";s:6:"normal";s:57:"acf-field-group-locations,acf-field-group-options,slugdiv";s:8:"advanced";s:0:"";}
    Login or Signup to reply.
  2. I solved the problem by adding a custom script for the ACF with delete class closed on #acf-field-group-fields:

    document.addEventListener("DOMContentLoaded", function(event) {
        document.querySelector('#acf-field-group-fields').classList.remove('closed');
    });
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search