Home Forums General Issues Merged 3 field groups, all data fine, except repeater


Merged 3 field groups, all data fine, except repeater

  • I had 3 field groups which I wished to combine into one, so I created new custom fields within field group A with the same names and labels as the custom fields in field groups B and C. I then deleted B and C.

    All the data mapped across fine, even the repeater data, in the backend. However, on the front end of my site, the repeater data has disappeared.

    I have tried clicking ‘update’ on individual posts, and this restored the missing data fine on the front end for that particular post. However, when I try to do a bulk ‘update’ of all posts, the repeater field data remains blank on the front end.

    I have over 400 posts which now have missing data on the front end. Any ideas what I can do other than go through each individual post clicking ‘update’???

  • Not sure if you still need help with this but it may help anyone with the same issue.

    The problem probably has something to do with the field_key values of the field.

    On the back end this field_key doesn’t matter much. You can, for example, create a custom field using the same field name as some other plugin, or that has been entered into the standard WP custom field editor and ACF will get any existing value.

    The front end works a bit differently when it comes to this in a lot of ways. For example, if you try to get a “repeater” field using get_field() that does not have the correct field_key set it in the DB the ACF will return a number that represents the number of rows because it does not know that the field is a repeater without that key. For more information you can see the field_key vs field_name section of this page

    You could correct this without editing and saving every post if you did a search and replace in the database to change all the old field_key references with the new ones.

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

The topic ‘Merged 3 field groups, all data fine, except repeater’ is closed to new replies.