Home Forums General Issues Need a way to bulk create missing underscore _values


Need a way to bulk create missing underscore _values

  • Hello,
    I have thousands of imported posts with many ACFs (import via WP All Import).

    I had issues with the acf/format_value/name=xyz filter and had a look at the DB.
    I found out that the posts which cause the issues have no underscore _fields in the database, only fields (just the meta values).

    A manual way to fix the issue would be to edit each post and update it. By saving all the _fields get created.

    What is the best way to do this automatically? Which hook triggers the _field creation?

  • When you used WP All Import did you use the ACF extension? If you did then this should not happen and I’d contact them about it. If you did not use this extension then that’s what caused it. It is practically impossible to import ACF fields without an ACF aware plugin.

    There isn’t a hook that triggers the ACF field key reference to be created. When you update a post ACF uses the field keys in the input fields for the name value. ACF uses the field key to look up the correct field name and update the value. It can’t be done in the reverse order and impossible to generate all of the correct field key references based on the values.

  • That is very helpful! thank you

  • Hi,
    sorry for not answering yet (didn’t receive a notification until the new answer today).

    Thank you John. The reason is that I don’t use the ACF extension of WP ALL IMPORT and just import meta values 😕

    I think I need to upgrade the import plugin.

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

The topic ‘Need a way to bulk create missing underscore _values’ is closed to new replies.