Difficulty importing a custom post type with images in ACF fields

Closed

Import WP Addon - Advanced Custom Fields Updated 2 years ago 7 Replies

Pramesh asked 2 years ago on March 24, 2023 at 5:54 am

Hi James,

Thanks for creating this plugin. I have the base plugin, the pro upgrade and the ACF add-on plugin installed. I exported the data from my production site and import it to my localhost. All of the text fields seem to import fine, but I can not for the life of me figure out how to get it to download the images properly.

At first they were not downloading at all, then after much trial and error I figured I would try referencing the image by URL and Image ID e.g. https://www.mywesiteurl.com/?p={image_id} or https://www.campwalden.ca/?p=40012 which redirects to https://www.campwalden.ca/wp-content/uploads/2022/06/IMG_8700-scaled.jpg. However, doing that downloads a binary file without a file extension and the filename is changed to something like www-1.campwalden-1.ca

I’ve included screen caps of my ACF fields, the Import WP Template Fields screen and a snapshot of my Media Library as well.

I really appreciate any help you can provide. Feel free to contact me direct via email if you need anything.

Thanks,

Pramesh

 

PA

Pramesh replied privately

2 years ago on March 24, 2023 at 5:59 am

J

James replied Support Agent

2 years ago on March 24, 2023 at 9:03 am

Hi Pramesh,

Can you confirm what versions of Import WP, Import WP Pro, and Import WP ACF addon you had installed on the site you exported, and on the site you imported?

From the exported csv file it looks like you may not have had the import wp acf addon installed on the site being exported as there should be a column containing the image url named {custom_field}::url

Can you please export and attach your importer settings to this ticket by going to Tools > Import WP > Settings / Tools > Import / Export and select and export your importer as a JSON file.

And can you also export your acf field group so i can test to make sure nothing is wrong , via Custom Fields > Tools

PA

Pramesh replied

2 years ago on March 24, 2023 at 1:50 pm

Hi James,

I'm clearly sleep deprived because I didn't think or realize that the ACF add-on would be needed on both the export and import sides. I had only installed it on the import side hence the missing columns in the data.

Both systems now have all 3 plugins installed (Core plugin v2.7.7, Pro extension v2.6.3, and ACF add-on v2.5.1).

I ran another export/import with greater success, however not perfect. The non-repeater fields are properly prefixed in the data (eg. acf.field_name) however my Images repeater field is prefixed differently (e.g. images.image, images.image::id, images.image::url, etc) and all of the data is in one cell (see attachment).

All of the images downloaded and appear in the media library and I can confirm they are attached to the post they were uploaded to (meaning, if I visit the post in WP admin look for images uploaded to the post in the media library I can see those images), but only the first image of the set appears in the repeater field and image descriptions for all images become the description for the one image.

What am I doing wrong?

Thanks in advance.

Pramesh

J

James replied Support Agent

2 years ago on March 26, 2023 at 10:44 pm

Hi Pramesh,

Can you try installing the attached addon on the site being exported and the site being imported and re-export and import the file.

The plugin updates the structure of how the acf repeater fields are exported, instead of the current structure of one column per repeater field with each row being seperated by a comma. The update transforms the output adding a column per row and per field.

James

PA

Pramesh replied

2 years ago on March 27, 2023 at 11:09 pm

Hi James I think that did the trick. I’ll need to check more thoroughly but at a quick glance it looks good. Thanks! Cheers, –– Pramesh Attwala Freelance User Experience Engineer 647.300.7104 Need a meeting?: calendly.com/prameshattwala/15min On Mar 26, 2023 at 6:44 PM -0400, Import WP Helpdesk , wrote: >
J

James replied Support Agent

2 years ago on April 7, 2023 at 9:03 pm

Hi Pramesh,

Just checking in to see how you are getting on with the importer? before i close the ticket.

To help support the plugin i would be very grateful if you could leave a rating/review only if you want to https://codecanyon.net/item/importwp-wordpress-xml-csv-importer/reviews/19703181

James

PA

Pramesh replied

2 years ago on April 7, 2023 at 9:08 pm

Hi James, All good here. Import export has been working well. Thank you for your help! On Apr 7, 2023 at 5:03 PM -0400, Import WP Helpdesk , wrote: >