Closed (duplicate)
Project:
Feeds
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
26 Dec 2012 at 00:41 UTC
Updated:
23 Jul 2014 at 08:32 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dagleesWhat source field are you mapping to FIG?
Comment #2
dawnbuie commentedHi @Daglees, I'm using the absolute source url of the blog item on the originating page. Just as I had with the RSS parser.
I do think I got some items to download (although I'll have to re-check that in an experiment today) at one point - but they weren't associated with the new node.
I have looked at the module code for FIG - and I don't see the error message "Invalid enclosure" so I suspect that comes from the Feeds XPath Parser module.
I wonder if there is something that needs to be called in FIG to help it save a node with the newly downloaded images when using XPath Parser?
Has anyone successfully used FIG and XPath Parser before?
Comment #3
helpmelearn commentedno man its not working.. , any one knows how to fix this ?
Comment #4
dagleesI'm using this code to grab the source URL so that I can map that with FIG.
Comment #5
twistor commentedThat patch is backwards.
Comment #6
summit commentedAre you saying what "minus" is must be "plus?
Greetings, Martijn
Comment #7
twistor commentedYessir.
Comment #8
summit commented@Daglees please post the patch as should be, would love seeing both modules working together.
greetings, Martijn
Comment #9
dagleesUpdated patch.
Comment #10
dagleesUpdated patch.
// Double post, sorry!
Comment #11
dagleesComment #12.0
(not verified) commentedclarification
Comment #13
rooby commentedThe problem with the patch is that it won't apply properly.
This is because of this: /Users/daglees/Sites/yakhabar/sites/all/modules/feeds_xpathparser/FeedsXPathParserBase.inc
This means that if you put it in the module directory and apply it with the patch command you would have to use "patch -p7", but it is expected to apply with "patch -p1" (this is the number of directories before the module directory).
See https://drupal.org/node/707484 for some further information.
Comment #13.0
rooby commentedChanged sitename.com to example.com, which is what should always be used.
Comment #14
kscheirerHere's a p1 version of the patch, also updated against latest 7.x-1.x-dev.
The patch worked for me. My feed uses HTTP Fetcher, XPath HTML Parser, and Self Node Processor.
After applying the patch, in the Mappings section of my processor, I set the source to "Item URL (Link)" and the target to "My Image (FIG)". On the next import it successfully found the image and saved it locally with the node. I assume the default settings for FIG were used to figure out which image to grab.
Comment #16
kscheirerThis is a much better patch - it only adds the url when the result is not empty.
Not sure why, but parse() can get called multiple times, with only 1 generating a real result. Adding url blindly creates too many items, and then everything starts breaking.
Comment #18
kscheirerI think it's a problem with the test, the failures are:
Text "Updated 1 node." not found
Comment #19
Mario Baron commentedthe patch from #16 is progress. However, on import only one image is added.
My feed uses HTTP Fetcher, XPath HTML Parser, and Node Processor. Using standalone form because I can't attach node processor to content type (bundle) because in that case the feed doesn't work (can't find title)
Comment #20
twistor commentedThis should just go in Feeds. It's not Feeds XPath Parser's responsibility to do this.
Comment #21
kscheirerComment #22
rooby commentedThis patch will not apply to feeds as it was written for feeds xpath parser.
A new patch will need to be made for the feeds module.
Comment #23
twistor commentedThis is already being worked on here #1689374: Map feed Title and feed URL