Trouble downloading XML and images

Closed
ImportWP Pro - WordPress XML & CSV Importer ImportWP Pro - WordPress XML & CSV Importer January 18, 2019
Login to reply
James Collings Support Agent
2 weeks ago
Resolved.
James Collings Support Agent
3 weeks ago

Using your previus XML, i have tested this when there are multiple "images" notes, if you select the name of the acf gallery field from the dropdown from the list of fields.

if you want control over what images are imported for the field you can set the value by seperating the values with a comma as such:

{/images[1]},{/images[2]},{/images[3]}

Or you can fetch all images nodes by setting the value of (removing the node index):

{/images}

To complete the ACF gallery setup you need to make sure you have the following:

Field Type: Attachment
Value: Comma seperated values
Return Value: ID
Download: Remote URL

James Collings Support Agent
3 weeks ago

Hi Chris,

ImportWP Pro allows you to import to wordpress custom fields in general, and has some basic Integration with the core ACF plugins fields,  if you can let me know what version of ACF / ACF Pro Are you using i can have a look into this and see what settings are needed or if i need to add in some extra functionality.

Chris Creswick
3 weeks ago

Hi James,

Hope you are well, I have been testing the import the last couple for days and things are going well. 

I am now trying to import multiple images as we discussed before but I am hitting a wall.  I am using the settings that you sent but it does not pull the images in, I think it may be due to me using the Gallery addon to the ACF plugin.

Is there a different method for the settings when using ACF Gallery?

Chris

Chris Creswick
4 weeks ago

Hi,

I have just ran an import on the whole remote file and this time it has worked. 

I suppose the main concern is stability...

I will run tests over the next few hours and let you know if i get any issues.

Chris

James Collings Support Agent
4 weeks ago

Updated and tested, should be working now

Chris Creswick commented privately
James Collings Support Agent commented privately
Chris Creswick commented privately
James Collings Support Agent
1 month ago

You dont need the custom field it was just an example or different ways to attach images.

Chris Creswick
1 month ago

Hi James,


I have tried your solution with the attachment field and it is working now, I will quest that the xml be adjusted to remove the white space.

Can I ask, does the custom fields settings have to be put in as well as the attachment or can they be done separately?

Chris

James Collings Support Agent commented privately
Chris Creswick
1 month ago

Hi James,

I assumed the cdata was the issue so I have tried witout wrapping the image and it gives the same result.

Instances where there are more images, the field just repeats itself like below:

<images>

<![CDATA[

http://homestylegb.com/wp-content/uploads/2019/01/cat-bedroom.jpg

]]>

</images>

<images>

<![CDATA[

http://homestylegb.com/wp-content/uploads/2019/01/cat-bedroom.jpg

]]>

</images>

<images>

<![CDATA[

http://homestylegb.com/wp-content/uploads/2019/01/cat-bedroom.jpg

]]>

</images>

James Collings Support Agent
1 month ago
Do you have an example of when there are more than 1 image?
James Collings Support Agent
1 month ago

Thanks for sending over the xml, i have an idea of what it could be the CDATA tags wrapping the image, i will test this out and get back to you.


Chris Creswick commented privately
Chris Creswick commented privately
James Collings Support Agent commented privately
Chris Creswick
1 month ago

Hello,


The xml file download is no longer an issue as the developers of the API have created an XML download for me so is fine now.


The main issue I am having is getting images to import. The feed I am using imports 1-4 images per entry so I must have this working.


Debug info below:


WordPress version: 5.0.3

Plugin version: 1.0.5

Php version: 7.0.33

Max execution time: 30

Max input time: 60

Memory Limit: 256M

DISABLE_WP_CRON: No

Toggle panel: File Upload

Post max size: 8M

Upload max filesize: 20M

Remote Fetch: Curl Request

Temp directory: /home/homestyle/public_html/wp-content/uploads/importwp

Temp directory writable: Yes

Toggle panel: Cron

Php version: 5.6.39

Max execution time: 0

Max input time: 60

Memory Limit: 256M

Post Max Size: 24M

Upload Max Filesize: 10M

Remote Fetch: Curl Request

Temp directory: /home/trojan1988/public_html/homestyle/wp-content/uploads/importwp

Temp directory writable: Yes


James Collings Support Agent
1 month ago

Hi Chris,

Are you able to get some debug info via ImportWP > Settings > Debug and copy all the information.

Not being able to download an xml file from that url initialy made me think there might be something wrong with the xml files mime type, are you able to download the file and send me a copy? if not can you download it and add it to an importer manually, does this work?

But since you are also not able to download attachments via custom fields / or by attachment, this points towards the method of fetching the file, hopefully the debug information.

Thanks

James

Chris Creswick
1 month ago

Hi,

I am having trouble downloading an XMl file, the api uses a token which amends the url of the file. For example: https://test.url/api/supplier/products?token=QPohB3N50ipnnuymhEFy&format=xml&page=1&page_size=5000

When I try to download this file your plugin fails because it cannot determine the file type. Can you assist me in finding a solution to this?

Secondly, your plugin will not download images into my custom post type. I have tried custom fields and attachment/set featured image options. The importer says complete with 0 errors but the image are not downloaded and placed in post.

Thanks