Closed (fixed)
Project:
Feeds XPath Parser
Version:
6.x-1.7
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
1 Oct 2010 at 17:29 UTC
Updated:
31 Oct 2010 at 21:30 UTC
Jump to comment: Most recent file
Hi! I just installed this module, and when I click to set up the Mapping, I get the following error:
Fatal error: Unsupported operand types in .../sites/all/modules/feeds_xpathparser/FeedsXPathParser.inc on line 220
Looks like it is complaining about this line:
+ parent::getMappingSources();
Can you please help me resolve this issue?
Thanks!
-Jen
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | FeedsJSONPathParser.inc_.patch | 488 bytes | phl3tch |
Comments
Comment #1
twistor commentedWhat version of Feeds are you running? Sorry for the delay.
Comment #2
moondancerjen commentedI'm using 6.x.1.7. I checked 1.8 and it had the same line, so I didn't upgrade. To get this to work I changed the function to this:
And that has gotten rid of the error, but I don't know if the module is behaving properly. In fact, when I go to edit my feed I can only give one XPath query to run even though I have set up about 5 fields that I'd like to map. Maybe this is a result of my alteration?
Comment #3
twistor commentedYour changes would only affect field inheritance. Sorry, I meant what version of Feeds not feeds_xpathparser.
Comment #4
phl3tch commentedIt looks like in the most recent version of Feeds, the FeedsParser plugin's getMappingSources() simply returns false. You can't union an array and false, hence the error. The fix in #2 should be fine, but I rolled a patch that checks whether parent::getMappingSources() is an array. If it is, it adds it. If not, it adds an empty array. A bit more robust a solution.
Comment #5
twistor commentedI'm not totally opposed to this patch, however, in feeds-6.x-1.0-beta9 and dev, FeedsParser::getMappingSources() looks like:
It used to return FALSE a while ago, but to my knowledge, the only FeedsParser plugin that returns FALSE anymore is the CSVParser.
Comment #6
twistor commentedCommitted a fix for this since the Feeds version isn't stated.
http://drupal.org/cvs?commit=437544