Closed (duplicate)
Project:
Feeds XPath Parser
Version:
7.x-1.0-beta3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Sep 2011 at 04:38 UTC
Updated:
22 Jul 2012 at 23:39 UTC
Jump to comment: Most recent file
Comments
Comment #0.0
oobie11 commentedEdit
Comment #1
oobie11 commentedAnyone
Comment #2
oobie11 commentedComment #3
philipz commentedI'm getting the same error after running import manually from /import page.
I've found so far that line 36 in FeedsXPathParserBase.inc there's a call for config witch is the reason for notice message.
$source_config = $source->getConfigFor($this);Next there's a check if the $source_config is empty.
I removed line 36 and it's working fine but I don't know yet if it might be necessary?
Comment #4
philipz commentedComment #5
twistor commentedDoes this happen after you have used the importer with a different parser first?
Comment #6
philipz commentedI might had used other imports with diffrent parser (CSV) but not this one. This one was XPath from the start.
Comment #7
Yorgg commentedI am also getting this on updated beta3 two times in a row for each import.
Anyone figure out this yet?
Comment #8
emilcarpenter commentedYes - sort of, for me it happens after using a different importer, but with the same parser.
I thought that maybe foreign characters such as åäö ñ ã in the HTTPFetcher URL affect this, I have to check this one more time. I convert them using:
I do the importing programmatically.
Something else than using different importers affects this too. This did not happen before, but after some Rules redirects coding and other stuff, this notice message started appearing. Maybe after I accidentally redirected with code 200 instead of 301 with drupal_goto and got a blank white page in the browser. I have not updated any modules before vs after the notice message. I'll see if I get to some more conclusions, will post here if so.
My imports are working fine despite this notice message.
And... thank you Twistor for the Feeds, Feeds Tamper and Xpath Parser modules - so great!
PS Using Drupal 7.9, Feeds 7.x-2.0-alpha4, Feeds XpathParser 7.x-1.x-dev, Feeds Tamper 7.x-1.x-dev
Edit: XPathParser dev is from: ; Information added by drupal.org packaging script on 2011-10-13
Comment #9
steinmb commentedAlso see this running manual import. Clean install of Drupal and feeds + xpath.
Notice: Undefined index: FeedsXPathParserXML in FeedsSource->getConfigFor() (line 577 drupal-7.10/sites/all/modules/feeds/includes/FeedsSource.inc)XML I tried to import was http://www.yr.no/place/Norway/Hordaland/Bergen/Bergen/forecast.xml
Comment #10
emilcarpenter commentedOk, guys!
Workaround:
I used this code for importing. This gave the error when i switched to import with another importer (but with the same parser):
Since the configuration seemed not to be able to be read, I figured it was not set properly, so I set it twice:
I'm not getting this error anymore!
Thanks to twistor pointing me out in the right direction in comment #5!
(Don't know if I should change the status to 'Needs Review' or something, so I just leave it.)
Comment #11
emilcarpenter commentedI still get errors at Cron run, even if it is not the line 577 error.
Posted debug info here: #3 http://drupal.org/node/1271502
Comment #12
emilcarpenter commentedPlease disregard my #10 comment, it was as a noob dream :) that did not have any effect.
What had effect was ticking the checkbox "Allow source configuration override".
Why I thought the #10 code had effect, was that I probably checked the checkbox the same time I made the above changes. Why I thought using different importer invoke the 577-error was that I probably had the checkbox unchecked at times for some of my importers.
I was using the checkbox just for the changes for the XPath Parser to take effect when saving and did not think of its real meaning.
(I am importing programmatically, so I have no idea why/how this error would be triggered by manual import as stated by #9, steinmb.)
For me this issue is closed, but being a noob, I let the more experienced users to set the Status of this thread. Hope I'm right this time...
Comment #13
timb commentedGlad I ran across this post. I have a Feed Crawler that looked like it should run fine but just wouldn't, ending in this issue's error. Rebuilding from the ground up solved all the problems.
Comment #14
theunraveler commentedIt looks to me like the method
FeedSource::getConfigFor()only has Fetcher plugins available to it; that's what the method name would indicate to me as well. So, I'm not sure if it makes sense for a Parser plugin to be trying to get its config from the Fetcher object.So here's a patch that just removes that call entirely. Since
$source_configis set later on in the function, the object should be getting everything it needs fromself::getConfig().Comment #15
theunraveler commentedActually, now that I think about it more, it looks like the object is trying to get its own config from the
FeedsSource. Unless I'm missing something, this seems really unnecessary. This patch just does some cleanup now that I'm pretty sure this is the case.Comment #16
steinmb commentedComment #17
twistor commented#15, The
$source_config = $source->getConfigFor($this);is needed. There are two different places that configuration can exist.What we're trying to do is allow configuration at the importer level, and allow users to override the values per feed node.
Comment #18
xjmI'm getting a similar error with the FeedsJSONPath parser module when I call
feeds_source('feed_name', $node->nid)->startImport(), and there are also issues posted for the same issue in other parser modules. I suspect either all these parsers will need the same fix, or perhaps there's something to be fixed in the base class in feeds itself?Comment #19
pefferen commented#13 Worked for me, thanks. but only when updating feeds_crawler to feeds_crawler-7.x-1.x-dev. instead of feeds_crawler-7.x-1.x-beta-1.
The patch provided in comment #15 did not seem to yield in changes in my use case, as far as I can tell. It might be needed in others, so I left it out and am back on feeds_crawler-7.x-1.x-dev again.
Though switching versions of feeds crawler seems to break the importers, which i made using the feeds crawler. It might be some setting it save to db.
Comment #20
gouky10 commentedIn my case:
I had
$value['año']and I could no get the value so I put$value[utf8_encode('año')]and IT SOLVE MY PROBLEM.Thank you
Comment #21
slefevre1 commentedI'm having this problem also. Is it perhaps because the feeds_xpathparser module doesn't properly set a config for itself?
Comment #22
twistor commentedCan you try this patch?
#1271502: Notice: Undefined index: FeedsXPathParserXML in FeedsSource->getConfigFor() when running cron.
Comment #23
slefevre1 commentedI haven't tried the patch yet -- yesterday after some playing around, the issue seems to have resolved itself. I am doing debugging prints of the keys for $config in the FeedsSource object, and now a key for FeedsXPathParserXML exists (the array doesn't appear to have any values, but I'm not getting any errors and data is coming in).
I haven't isolated it, but it the config key seems not to be generating immediately upon specifying to feeds that you want to use xpath_parser. But what seems to have triggered the generation of the key is setting some of the mappings and xpath queries.
Comment #24
twistor commentedI'm going to mark this as a duplicate of #1271502: Notice: Undefined index: FeedsXPathParserXML in FeedsSource->getConfigFor() when running cron.
Comment #24.0
twistor commentedclarity