Hi,
I was using the current version of feeds for D7 to import and XML feed using Xpath which was working fine until the XML was updated to the following:
http://xml2u.com/Xml/La%20Perla%20estates_1426/4244_Default.xml
Which cause the error below:
I identified the possible issue was duplicate image file names and understood that there was a fix in the dev version of feeds. I updated to the dev version and the error has now been fixed but I am still not importing any images. I also noticed that the feeds image field has changed the xpath mapping to Property Photos: URI (field_image:uri) from Property Photos: (field_image) which does not match the content type field?
If anyone can help please it would be much appreciated.
Thanks
Mark
Comment | File | Size | Author |
---|---|---|---|
#5 | feeds-2487958-importer.txt | 2.11 KB | MegaChriz |
Comments
Comment #1
mambotech CreditAttribution: mambotech commentedComment #2
MegaChriz CreditAttribution: MegaChriz commentedAccording to the posted error, it seems like you try to import images with the XML tags included:
<image number="14"><image>http://www.laperlaestates.com/images/com_joomanager/items/55/1186_6c6068e28a8f3c4c9f9e5eb9e8a36a30.JPG</image><alttext/></image>
While Feeds expects an URL:
http://www.laperlaestates.com/images/com_joomanager/items/55/1186_6c6068e28a8f3c4c9f9e5eb9e8a36a30.JPG
Solution: adjust the XPath settings for your image field. Your XPath settings are probably ending in
images
right now. Extends this so that the path ends withimages/image/image
.To review the results of the XPath settings before doing the real import, you could use the Feeds import preview module. This module allows you to see what your source looks like after it has been parsed.
Comment #3
mambotech CreditAttribution: mambotech commentedHI MegaChriz
Thanks for replying but that makes no difference unfortunately I still have the same problems. No images imported. Also if I switch back to the stable version of feeds I get this error for every imported image. If I use the dev version I don't get the error but also do not get the images.
Notice: Undefined variable: file in FeedsEnclosure->getFile() (line 388 of /var/www/spn/sites/all/modules/feeds/plugins/FeedsParser.inc).
Notice: Undefined variable: file in file_feeds_set_target() (line 85 of /var/www/spn/sites/all/modules/feeds/mappers/file.inc).
Thanks
Mark
Comment #4
mambotech CreditAttribution: mambotech commentedHI MegaChriz
Thanks for replying but that makes no difference unfortunately I still have the same problems. No images imported. Also if I switch back to the stable version of feeds I get this error for every imported image. If I use the dev version I don't get the error but also do not get the images.
Notice: Undefined variable: file in FeedsEnclosure->getFile() (line 388 of /var/www/spn/sites/all/modules/feeds/plugins/FeedsParser.inc).
Notice: Undefined variable: file in file_feeds_set_target() (line 85 of /var/www/spn/sites/all/modules/feeds/mappers/file.inc).
Thanks
Mark
Comment #5
MegaChriz CreditAttribution: MegaChriz commentedWith the attached importer settings I did get the images imported. I used the XML Xpath parser from the Feeds Extensible Parsers module.
Comment #6
mambotech CreditAttribution: mambotech commented@MegaChriz
Hi,
I setup the importer and it imported the images, I then deleted the nodes and ran the import again but this time it did not import the images. I ran in debug mode and it displayed the images as being imported but when viewing the node they are not displayed.
I checked the database and it shows the images in the image table https://www.dropbox.com/s/kzytapwy6rjzl0c/Screen%20Shot%202015-05-19%20a...
This is really a strange one.
Thanks
Mark