0

I'm using the Feeds and Feeds XML XPath Parser modules on Drupal 7. While there is no problem importing all other fields (Title, body, etc.), it does not populate the image field in my nodes.

Feeds debug mode shows all paths to be relative, so I'm using Feeds Tamper to rewrite the relative paths to absolute paths (all on the same domain). Still, no images are being saved.

There are no errors displayed on the import page, nor in Drupal logs.

UPDATE: After some more altering the image paths via Feeds Tamper, now the following error is shown in the logs: Invalid enclosure ""

Where should I start debugging this?

Thanks!

  • Is your drupal running from a distant server or a local machine ? It append to me, when I was importing image with feeds, that the server hosting the images was not reachable from my drupal server : I had to add the name in the host file with a correct IP address. – TytooF Aug 9 '16 at 8:34
  • The images are coming from a distant server, yes. The paths to the images are relative urls, I add the host with feeds tamper. How did you solve it? – marcmueller Aug 9 '16 at 8:44
  • You must use absolute URL for your images, else Feeds will think it's an URL on the drupal server. After, try to do a WGET on one image URL from the drupal server, and you'll see if it can reaches it. – TytooF Aug 9 '16 at 8:49
1

I had a similar issue while using Feeds, Feeds XLS and Feeds Tamper. I solved it by copying the images in the path mentioned before importing using Feeds.

I am not sure but I think you should first run a script that copies the images onto the path mentioned in the Image field and then import nodes using Feeds.

For example, if your path to images is 'sites/default/files/myimages', you should first copy the images to 'myimages' folder and then run Feeds because Feeds/Feeds Tamper simply populate the file path AFAIK. These modules do not actually save the images.

Let me know if this helps.

Regards,

Supriya Rajgopal

  • Thanks, Supriya. The XML is from an external source, and will have to be imported on daily base, so this needs to be an automated process. How can I debug the tampered results? – marcmueller Aug 9 '16 at 6:03
  • Hi @marcmueller, I have honestly not worked with XML before. May be you could run a cron .bat script daily which simply dumps the images from external source to your folder?But before you import using Feeds. – Supriya Rajgopal Aug 9 '16 at 6:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.