Home Forums General Issues Can't figure out connection between old(php driven) ACF data


Can't figure out connection between old(php driven) ACF data

  • Hey there,
    I have a project that I’m working on. Part of this involves moving ACF fields that were registered via PHP to local JSON.

    For that, I export the PHP fields as JSON, adjusted them, and added them to the JSON file that was holding the new ACF group, changed the modified timestamp and synced.

    That part went fine, the part that didn’t was the historical data that was in those fields. They don’t show up in the new group.

    When I re-activate the PHP registered fields, the data shows up there.

    Looking through the data I can’t find any reference to the old ACF group, but there seems to be one since it only shows when the old group is active? Where would that be?

  • ACF finding the data is dependent on a combination of the field name (meta_key) and the field_key for each field.

    In addition to this there was a change not long ago that effectively makes in impossible to get field values for fields not defined by an acf field so getting a value for a field depends on field_key existing and corresponding to the field name.

    If either the field key or field name is changed then it is very likely you will not be able to get the data saved under the old field name/field key combination.

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

You must be logged in to reply to this topic.