Support

Account

Home Forums Backend Issues (wp-admin) Some field values are not saving

Solved

Some field values are not saving

  • I recently encountered an issue where some of my field values are no longer saving. One involves the Gallery add-on and the other involves a simple select field. I’ve search across the forum but couldn’t find a topic that was specific to my issue.

    Here is something I considered: My particular situation involves 2 field groups that have fields with the same name. I didn’t think this would be a problem since each field has its own unique key. Could this possibly be the reason that some fields are no longer saving? For example, each group (“Sale Properties” and “Lease Properties” are the groups I have created) has a field called “Property Type” (property_type). This particular field doesn’t save anymore on the Lease Properties field group but it seems fine on the Sale Properties group (FYI, the Sale Properties group was created first and I modeled the Lease Properties group after it). I noticed in some other topics on here that people encountered similar issues when coupling ACF with Shopp and other similar ecommerce plugins, but I don’t have anything of the sort installed.

    I actually tried renaming the Property Type field for Lease Properties to differentiate it from the Sale Properties one but that didn’t seem to do the trick. Any thoughts?

    Thanks in advance!

  • Hi @daryn

    Yes, the problem is that you have 2 fields with the same field name.

    ACF saves the value in the database using the field name, not the field_key.

    This allows you to use meta_queries.

    Please make all field names unique that appear on the same edit screen.

    Thinking about the front end. How would you load the data if the field names are the same? get_field(‘title’) – which title would it know to load?

    Thanks
    E

  • @elliot – Thank you for confirming this. I didn’t even think about the get_field() end of it. I’ll go through and rename any fields that require it.

  • Hi @elliot – I’m now encountering a similar issue on a different website. I’ve been adding fields right along and their values have been saving without a hitch, until now.

    I’ve created a new field and made sure to give it a unique name, but any new fields I add at this point are useless. When I try to enter a value and save it, nothing happens. WordPress says that the changes were saved but none of the new fields’ values are actually saved to the database. I haven’t had this issue before on this particular site and nothing has changed recently, so I’m baffled. Is it possible that W3 Total Cache is interfering? I’ve had it installed the entire time and no other fields have been affected. There was an update available for ACF but even after upgrading, the issue persists. It only occurs on new fields. All existing fields’ values are saved successfully.

    Any ideas? I figured it would be easier to continue the discussion here other than starting an entirely new topic since this is along the same lines.

    Thanks!

    PS — I don’t know if it helps but these fields are used on a custom post type that I created.

  • Hi @daryn

    This could be a number of things.

    I would start by disabling all other plugins to test if the issue is a conflict.
    Then change the theme to default twentyten.

    After that, I would consult the server logs to see if you are hitting a limit during the save process. It is possible that your server is running out of memory / vars.

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Some field values are not saving’ is closed to new replies.