Hello, I’m using the WP All Import plugin to mass import a lot of data. It works great, but I’m having an issue with file fields. I imagine the same thing would happen for image fields.
I have a field group set up with one field being a file. I have set it to be a file URL. When I do the import, the value for the file URL is imported correctly. And if I search for the meta_key / meta_value pair in the database, I see what I’d expect.
The problem is on the editing side of things. If you go to edit an imported record, the interface does not recognize that the file field has a value. The file itself is in the Media Library and, as noted, the value is listed in the database. So why doesn’t the file interface display the selected field?
Ah-ha. The plot thickens. One of the custom post type records file field had been edited to select a file, so that now if you go to the edit view, you do see a file selected there. If I search for that meta_key and that post_id in the database, I don’t any results. So are ACF file and image fields not stored in the wp_postmeta table?
I found it… The file is stored in the wp_posts table as a post_type of attachment and a post_parent ID of the record in question. I think I’m still missing something, though, because I still don’t see how it is tied to the field itself…