skip to Main Content

I have a website with more than 15 ACF groups. On one of them, there’s a repeater and the last of 6 fields is a URL (I tried switching it to Text, same result). I see the field on my page where I use it as a block (Gutenberg). I can enter a value, and it "saves"… Or so I think. If I refresh the page, it’s not there anymore (the field is empty).

Now, I went on and switched to the Visual Editor – Code view, and… it’s not there. Nothing. I’m wondering: why is it showing when I’m in Classic View, but not on code view… clearly, if it’s not there, it ain’t saving!

After that, I added the code myself and what do I see: it’s there, and saving, and still there.

To add the code myself is a big No-No because I’m building a site for a client… There must be a solution or a known patch…

(NB: I do not have any code to display since it’s kindof in the backend… and not really code-ish related)

3

Answers


  1. Can be reason 1: ACF fields not saving

    I also had problem where the custom fields were not getting saved in the backend editor.

    You should do a backup of the website before you try this. If you don’t know how to do (save wp-content folder, export database), I recommend a free plugin called "All-in-One Migration" to do the backup.

    My solution for ACF fields not getting saved:

    1. Duplicate the field group in the ACF page. To do so go to the field group page of the acf plugin, hover the field group name, there should now be a link called "Duplicate".
    2. After duplicating you delete the "old" field group. You can now name the new field group the way it was called.
    3. You will notice that all the field names are still the same, so it will work if you got the fields echoed in the template files of the website. Do only now have new "keys" for the fields in the database.
    4. Try to save the fields in the backend editor now, the problem with not saving fields should be solved.

    This helped me when I deployed a website to another server. Sometimes the keys must be re-defined by using this duplicate method.


    Can be reason 2: saving process can not complete

    Edit the php.ini file on your webserver or contact the host to do so and increase max_input_vars and max_execution_time.
    Maybe there are too many fields and values so there are more than the maximum allowed input vars. Or the saving process is taking too long because of lots of fields, so the maximum execution time is reached, saving process cannot run to the end of all fields.

    Login or Signup to reply.
  2. I had this problem and solved it by erasing the files in the /theme-name/acf-json/fr/ directory. It happens to me once in a while. Probably because we are using WPML (that explains the /fr/) and the firm who made the website made all fields translatable.

    Login or Signup to reply.
  3. I needed to delete the ACF group and recreate it in order to get the saving of data changes working again.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search