Here's the problem:
1 Create feed
2 Enter Feed URL
3 Save Feed
4 Refresh feed and notice no content is retrieved.
5 Edit feed. The Feed URL field is blank.
6 GOTO 2
No errors in the watchdog.
With some URLs, I do see that the feed description has been updated, so that would suggest the XML was retrieved and parsed.
Will an error in the processor cause the URL to be blanked?
What can I do to track this down?
I'm trying to use FeedAPI to retrieve some full-text news articles and submit them to the OpenCalais engine for tagging as a test of Calais' capabilities.
| Comment | File | Size | Author |
|---|---|---|---|
| #140 | 260670_url_is_discarded_1.patch | 1.73 KB | aron novak |
| #138 | 260670_url_is_discarded.patch | 1.46 KB | aron novak |
| #123 | feeedapi_discard.patch | 871 bytes | aron novak |
| #119 | feedapi_results.txt | 124.78 KB | greg.harvey |
| #55 | dbexport.sql_.zip | 149.53 KB | happysnowmantech |
Comments
Comment #1
yelvington commentedUpdate:
My first-created feed DID work, so as an experiment I edited it and replaced its URL. On saving I got these errors, and the URL field was blanked.
* warning: in_array() [function.in-array]: Wrong datatype for second argument in htdocs/sites/all/modules/feedapi/feedapi.module on line 933.
* warning: Invalid argument supplied for foreach() in htdocs/sites/all/modules/feedapi/feedapi.module on line 935.
* warning: in_array() [function.in-array]: Wrong datatype for second argument in htdocs/sites/all/modules/feedapi/feedapi.module on line 933.
Comment #2
bflora commentedHaving same problem. Subscribe.
Comment #3
xamountYou must have a parser module checked (installed) for feedapi to work. Simplepie Parser comes with feedapi, so check that box on the modules page (nb - follow the directions to install simplepie in the readme file that comes with it). Hope that helps.
Comment #4
phani commentedexactly same error as described by yelvington (#1), and SimplePie parser _is_ enabled. i removed the "stop gap" from feedAPI module, as described in the README, but that doesn't help either.
Comment #5
bflora commentedI also have SimplePie parser installed and running. And this works fine for other feed items. I'm having trouble with a 300 character feed from Daylife.com
Comment #6
intropedro commentedI had spent the same thing. And now work.
1- Delete all feed nodes.
2- Disable SimplePie parser module.
3- Enable Common syndication parser module (I have php5).
4- Create one feed node.
5- To give the button Refress.
I hope that helps.
Comment #7
stevebayerin commentedTry setting the weight of the parser (simplepie or XML) to -15. That should fix the issue.
Comment #8
alex_b commented@yelvington: did #7 help?
Comment #9
geodaniel commentedClosed #288492: Can't get feedapi to function at all - SimpleFeed works fine as a duplicate of this.
Comment #10
geodaniel commentedI'm seeing the same problem, and I've tried altering the weight of parser_simplepie to -15 (and even to -100 to ensure it's run after everything else) but it doesn't change the behaviour for me.
If I use the Common syndication parser it does seem to pull in feeds as expected (without having to change the weight), and store the feed URL in the node if going in to edit it.
Comment #11
greg.harveyDoes #7 refer to the system table in the database? Module weight?
Comment #12
stevebayerin commentedIts for the module weight. I've had issues with the feed not being saved on submit and thought I'd share what worked for me.
Comment #13
wisdom commentedI have a very long feed url I got it from link share its url is not get saved and no feed items retrieved either. I can retrieve the feed items in Google feed reader using that same feed url. I can also save feed url
and retrieve feed from other source using feedapi.
What is going on here? The solution suggested in this thread not working either. Sorry this thread is for Drupal 6 I am using Drupal 5 and it sounds it is wrong thread. May be I have to post in the right category.
Comment #14
Erco commentedDon't you have "FeedAPI Node Views" enabled.I suddenly had exactly the same problem after enabling that module.I wouldn't be surprised if it would have an impact.Indeed, tracing the code before I can came back to the brand old question; "what did changed recently?",I found that no url was stored in the array processed by _feedapi_update function in feedapi.module
This fairilly causes the message : warning: in_array() [function.in-array......But the source of the problem is more: "what does interfer in the node store process in your configuration.Note: I had node_weight also in the area, but I installed it after I notice my feed problem.Wrong statement.
Indeed I had the same problem than yours but the final solution was to upgrade to last feed api version (5.X.1.2 as I'm running Drupal 5.9).
Problem was immediatelly solved after upgrade.php
Comment #15
greg.harveyThis is a Drupal 6 thread referring to the latest Drupal 6 release, so upgrade is not an option for us.
Comment #16
ahoria commentedsubscribing
* a feed node is not saved, along with feedapi settings
* I get the following warnings when submitting a feedapi node:
* warning: Invalid argument supplied for foreach() in /home/adpost/domains/example.com/public_html/sites/all/modules/feedapi/feedapi.module on line 1281.
* warning: Invalid argument supplied for foreach() in /home/adpost/domains/example.com/public_html/sites/all/modules/feedapi/feedapi.module on line 1281.
Using the parser_common_syndication parser, both the 6.x-1.2 and 6.x-dev versions show identical behavior.
I am running a multilingual site if this matters at all.
No cron/module weight involved, as these two issues occur on submitting the node.
Comment #17
iqbal.pakistan commentedI have a https URL as feed URL , but SimplePie parser module is not supporting https feed. Can you tell me the solution?
Comment #18
greg.harvey@iqbal.pakistan: start a new issue if you want an answer - don't post unrelated questions in existing issues. Apart from anything else, no one will see your question if you bury it in an unrelated post! =)
Comment #19
greg.harvey@ahoria, I'm seeing this too. Sadly it seems FeedAPI shouldn't be a point release right now. I'm going to try the dev snapshot.
Comment #20
greg.harveyThis is not fixed in the development snapshot either. Are the maintainers aware, I wonder? Setting to 'critical' - 6.x versions currently unusable it would appear. =(
Comment #21
fm commentedI am experiencing this same problem under FeedAPI 5.x-1.2
Comment #22
greg.harvey@fm: if I were you I'd create a new issue for version 5.x-1.2, include a link to this issue and also mark it as a critical bug. It's probably not a difficult fix, but I don't have time to devote to it right now. Simplefeed works as a stop-gap. =(
Comment #23
wisdom commentedSo do I but resolved after some trial and error. Disable SimplePie and just use common syndication.
If this does not work also try to disable the view module for feedapi.
Comment #24
ahoria commentedIssue remains in the 2008-Aug-14 dev build. FeedApi not usable at all.
Comment #25
samc commentedSame problem here w/ latest dev download. Niether simplepie nor common syndication parser work. Php 5.2.5.
Comment #26
aron novakNeed to know to locate the problem:
At simplepie parser:
- Which version of simplepie do you use?
- What's the exact feed URL?
At common syndication parser:
- What's the exact feed URL?
For both:
- Please run the automated simpletest tests of feedapi, those tests should run without any errors on a sane installation.
Comment #27
ahoria commentedI can't get simpletest 6.x-2.2 to recognize the feedapi test - are these versions compatible?
Not sure if this is relevant: I get simpletest errors on my Drupal install regarding the locale.module.
Comment #28
greg.harveySimplePie:
- SimplePie v 1.1.1
- http://defaqtoblog.com/iabn/feed?cat=-117,-118
Common Syndication Parser:
- http://defaqtoblog.com/iabn/feed?cat=-117,-118
Will run tests when I get chance. V. busy today.
Thanks for looking in to this! =)
Comment #29
aron novakWell, I could not reproduce your problem. In order to find the problem, can you attach the {variable} table dump?
Comment #30
caole261188 commentedThis is not meant to advertise the link or anything, but I tried adding this feed url again and again, it just doesn't work:
http://www.scriptlance.com/cgi-bin/freelancers/rss_projects.cgi?show\x3d10\x26f\x3d\x26u\x3d\x26c\x3d\x26r\x3dgaryc40\x26d\x3d1\x26text\x3d1\x26cat\x3d31
I hope it can help you reproduce the bug.
Comment #31
caole261188 commentedMore information:
I can only track as far as:
function _feedapi_insert(&$node, $teaser, $page) {
if (isset($node->feed->url) && isset($node->feed->feed_type)) {
and $node->feed->feed_type is not defined. As a result, it's not stored in the database.
Comment #32
aron novakcaole261188: Needs more info: parser name, output of
select * from feedapi where url like '%scriptlance%';, output ofselect * from variable where name like '%feedapi%';, success or fail at simpletest tests.I could create this feed URL with both parser and refresh as well.
Comment #33
greg.harveyI wonder if another module is conflicting here?
I have a suggestion. Unfortunately I don't have time to do this right now, as I'm mid-project, but if someone else does:
1. clean Drupal 6.4 installation
2. install Feed API + dependencies (and nothing else)
3. enable the SimplePie parser and try this feed: http://defaqtoblog.com/iabn/feed?cat=-117,-118
(it's known to fail in the past)
4. if it fails, dump the {variables} table and post sql script here
5. if it succeeds, post and let us know (issue may not be with Feed API in this case)
6. disable SimplePie and repeat steps 3. thru 5. for Common Syndication Parser
If 5. is the case for both tests, we can start enabling modules and see where it breaks! =)
Comment #34
aron novakgreg.harvey: you're right. It's very likely that there is a module conflict in these cases. That's why I ask people to run automated tests of FeedAPI, but unfortunately most of the people didn't run those tests.
There is a huge warning at the bug reporting form:
"Before you submit a bug report, please make sure to run automated tests for FeedAPI." but it seems to be almost worthless.
Comment #35
caole261188 commentedHi,
Thanks for your reply.
I ran simpletest, there's no error.
About the query results:
- select * from feedapi where url like '%scriptlance%';
4 rows found, but those rows contain normal feed url such as: http://www.scriptlance.com/rss/rss_projects_d_dot_NET.xml , not the monstrous feed url I posted before (
http://www.scriptlance.com/cgi-bin/freelancers/rss_projects.cgi?show\x3d10\x26f\x3d\x26u\x3d\x26c\x3d\x26r\x3dgaryc40\x26d\x3d1\x26text\x3d1\x26cat\x3d31) which doesn't got stored in the database.
- select * from variable where name like '%feedapi%';
attached is the dump file for the results, exported by phpmyadmin.
The feed: http://defaqtoblog.com/iabn/feed?cat=-117,-118 is not a problem with me, it got added and updated nicely.
The feed http://www.scriptlance.com/cgi-bin/freelancers/rss_projects.cgi?show\x3d10\x26f\x3d\x26u\x3d\x26c\x3d\x26r\x3dgaryc40\x26d\x3d1\x26text\x3d1\x26cat\x3d31 is not added to the feedapi table, but is displayed on the content list.
Modules installed:
simpletest
views
feedapi and dependencies
taxonomy
Parser used: common syndication parser.
I will try a fresh installation again later, but I really hope this post can help you track the bug.
Thanks for your support.
Comment #36
momper commentedsame problem ...
system + modules
Drupal 6.4
Advanced help 6.x-1.0
Backup and Migrate 6.x-1.0
Computed Field 6.x-1.x-dev (2008-Aug-26)
Content Templates (Contemplate) 6.x-0.13
Content Construction Kit (CCK) 6.x-2.0-rc6
Content Taxonomy 6.x-1.0-beta3
FeedAPI 6.x-1.2
Flag 6.x-1.0-beta3
jQuery Update 6.x-1.1
Localization client 6.x-1.3
Link 6.x-2.3.1
Pathauto 6.x-2.x-dev (2008-Aug-27)
System Info 6.x-1.0-beta2
Tagadelic 6.x-1.0
Taxonomy Manager 6.x-1.0-beta1
Token 6.x-1.11
Transliteration 6.x-2.0
Views 6.x-2.0-rc1
PHP Version 5.2.5
CURL version 7.16.4
GD version bundled (2.0.34 compatible)
MySQL Version 5.0.51b
i installed simpletest - is there a special feedapi-test?
greetings momper
Comment #37
momper commentedCommon Syndication Parser
url to test: http://www.bar-blog.de/feed/
Comment #38
juliendorra commentedI had the same problem in 5.7 ("Feed URL is discarded, feed items not saved")
And I solved it by changing the weight of the SimplePie Parser to -15 in the Feed content type Settings.
Comment #39
greg.harveyIf caole261188 had no trouble with my feed, when I did, that implies the feed URL, type or anything else related to it is not the problem here. URL length might be *a* problem. I'd certainly want to look more closely at the feed settings saving functions. I wish I had the time to dive in here, but I'm mid-sprint on a big project. =(
Comment #40
jrabeemer commentedI ran into this bug too. Running D6.4, Views 2, CCK-dev. Using common parser.
Installed Common syndication parser and FeedAPI 1.3
Getting warning:
* warning: Invalid argument supplied for foreach() in /Sites/carmen/cgv3/web/trunk/www/sites/all/modules/feedapi/feedapi.module on line 1279.
* No processors specified for URL http://www.nytimes.com/services/xml/rss/nyt/Washington.xml. Could not refresh.
* warning: Invalid argument supplied for foreach() in/Sites/carmen/cgv3/web/trunk/www/sites/all/modules/feedapi/feedapi.module on line 1279.
Going back to the modules page to reset the FeedAPI modules, I get a big page dump of PHP warnings after getting the above error. It seems FeedAPI messed my DB up.
WARNING: I wouldn't install the 1.3 module in D6 until this is resolved.
Comment #41
jrabeemer commentedI switched to SimplePie and uninstalled common parser. I uninstalled all the modules and reenabled FeedAPI 1.3 and Simplepie. I created a feedapi content type with simplepie parser and used a yahoo RSS file: http://rss.news.yahoo.com/rss/tech I set the weight to -15. I added a new feed node then I get an empty list with a warning:
* warning: Invalid argument supplied for foreach() in /Users/sdfsdf/Sites/carmen/cgv3/web/trunk/www/sites/all/modules/feedapi/feedapi.module on line 1279.
* No processors specified for URL http://rss.news.yahoo.com/rss/tech. Could not refresh.
* warning: Invalid argument supplied for foreach() in /Users/sdfsdf/Sites/carmen/cgv3/web/trunk/www/sites/all/modules/feedapi/feedapi.module on line 1279.
I look into my /sites/default/files/simplepie_cache/ and can see a temp file. 015db1c20559fa296fbc08f3150a73e1.spc The file contents show a big array with my yahoo feed. So it seems to download fine.
When I delete the node, I get this error:
* warning: Invalid argument supplied for foreach() in /Users/sdfsdf/Sites/carmen/cgv3/web/trunk/www/sites/all/modules/feedapi/feedapi.module on line 1279.
* warning: Invalid argument supplied for foreach() in /Users/sdfsdf/Sites/carmen/cgv3/web/trunk/www/sites/all/modules/feedapi/feedapi.module on line 1279.
* warning: array_shift() [function.array-shift]: The argument should be an array in /Users/sdfsdf/Sites/carmen/cgv3/web/trunk/www/includes/form.inc on line 1315.
* warning: Invalid argument supplied for foreach() in /Users/sdfsdf/Sites/carmen/cgv3/web/trunk/www/sites/all/modules/feedapi/feedapi.module on line 1279.
Comment #42
aron novak"I uninstalled all the modules and reenabled FeedAPI 1.3 and Simplepie" If it's true, FeedAPI told you what's the problem:
"No processors specified for URL" - so please enable FeedAPI Node module too and enable that processor for the given content-type as well.
Comment #43
jrabeemer commentedSo FeedAPI Node modules *must* be enabled to even use FeedAPI? FeedAPI + Common Parse/Simplepie is not enough? I don't want to use Feeds As Nodes for now.
In the two scenarios I posted, I was trying out..
FeedAPI 1.3 + Common Parser (I'm using PHP5)
then I tried...
FeedAPI 1.3 + SimplePie
I initially tried...
FeedAPI1.3 + Common Parser + FeedAPI Nodes (I thought this wasn't mandatory?)
I'm just trying to get this thing to work without giving me warnings. I'll uninstall FeedAPI and try again.
Update:
I uninstalled and removed all FeedAPI modules, used uninstall to remove the FeedAPI tables. Then, I enabled FeedAPI 1.3, then Common Parser. I created a new custom node type, called Aggregator Feed, checked off "Is a feed content type" and enabled "Parser Common Syndication - only for PHP5". Under Processor settings, it's blank obviously. Saved, then created a new content using the new node type. I added a feed, http://www.washingtonpost.com/wp-dyn/rss/world/index.xml, saved.. It comes back with an error.
I get.. warning: Invalid argument supplied for foreach() in /Users/sdfsdf/Sites/carmen/cgv3/web/trunk/www/sites/all/modules/feedapi/feedapi.module on line 1279.
Followed by.. when I click the refresh tab.
* warning: Invalid argument supplied for foreach() in /Users/sdfsdf/Sites/carmen/cgv3/web/trunk/www/sites/all/modules/feedapi/feedapi.module on line 1279.
* No processors specified for URL http://www.washingtonpost.com/wp-dyn/rss/world/index.xml. Could not refresh.
* warning: Invalid argument supplied for foreach() in /Users/sdfsdf/Sites/carmen/cgv3/web/trunk/www/sites/all/modules/feedapi/feedapi.module on line 1279.
No processors? Ok, so now I just want it to produce some kind of result with out a warning. I enable Feed Node. Go back to my content type, "FeedAPI Node - create nodes from feed items" is now lit up. I go to my feed node, click refresh. I just get this error. * No processors specified for URL http://www.washingtonpost.com/wp-dyn/rss/world/index.xml. Could not refresh. I go back and enable my node processor and set default node to Page. I go back to my node, then press refresh tab. I get.. "Could not refresh feed." I click edit and change my feed to http://digg.com/rss/index.xml and save. I get warning: array_shift() [function.array-shift]: The argument should be an array in /Users/sdfsdfsdfsdf/Sites/carmen/cgv3/web/trunk/www/includes/form.inc on line 1315. I click refresh tab, I get a full screen dump of this repeating.. # warning: array_filter() [function.array-filter]: The first argument should be an array in /Users/sdfsdfsdfsdf/Sites/carmen/cgv3/web/trunk/www/sites/all/modules/webform/webform.module on line 474.
# warning: Invalid argument supplied for foreach() in /Users/sdfsdfsdfsdf/Sites/carmen/cgv3/web/trunk/www/sites/all/modules/webform/webform.module on line 474.
# warning: array_filter() [function.array-filter]: The first argument should be an array in /Users/sdfsdfsdfsdf/Sites/carmen/cgv3/web/trunk/www/sites/all/modules/webform/webform.module on line 474.
# warning: Invalid argument supplied for foreach() in /Users/sdfsdfsdfsdf/Sites/carmen/cgv3/web/trunk/www/sites/all/modules/webform/webform.module on line 474.
I click remove items tab. I get a promissing result.. # Webform Troopergate: Did Sarah Palin Illegally Access Police Files has been deleted.
# Webform First Bill Gates + Jerry Seinfeld Microsof Ad Makes No Sense has been deleted.
# Webform House of Pancakes [XKCD] has been deleted.
# Webform Detroit Mayor Pleads Guilty, Agrees To Resign has been deleted.
# Webform 5 Fall TV Shows That Could Be Improved With A Little Sci-Fi has been deleted.
# Webform Rumor: GTA IV DLC Actually, Really Coming This November has been deleted.
# Webform How U.S. Researchers Are Making the Switch to LHC has been deleted.
Not bad. Now I click refresh tab again..
# warning: array_filter() [function.array-filter]: The first argument should be an array in /Users/sdfsdfsdfsdf/Sites/carmen/cgv3/web/trunk/www/sites/all/modules/webform/webform.module on line 474.
# warning: Invalid argument supplied for foreach() in /Users/sdfsdfsdfsdf/Sites/carmen/cgv3/web/trunk/www/sites/all/modules/webform/webform.module on line 474.
# warning: array_filter() [function.array-filter]: The first argument should be an array in /Users/sdfsdfsdfsdf/Sites/carmen/cgv3/web/trunk/www/sites/all/modules/webform/webform.module on line 474.
# warning: Invalid argument supplied for foreach() in /Users/sdfsdfsdfsdf/Sites/carmen/cgv3/web/trunk/www/sites/all/modules/webform/webform.module on line 474.
Not sure what to do now.
Comment #44
aron novakQuote from the README.txt:
Comment #45
jrabeemer commentedI see that. Read above after I enabled a processor.
Update:
I see the default Feed content type is created. I create a new node based on that type. I use http://digg.com/rss/index.xml feed. Save, then I get "Title could not be retrieved from feed." I go back and set the title to "test" Save, now I get no warnings. The view tab is blank. I click refresh, still get empty view tab. I click remove items tab, empty view tab. I click edit and see the URL field is empty!?!? I try http://rss.ireport.com/feeds/latest.rss feed. Save and still getting blank view tab.
Update#2:
It would seem the default Feed content type doesn't save it's Feed URL at all (Maybe this deserves its own bug report?). So I disable Common Parser and enable SimplePie. At this point FeedAPI + FeedNode + SimplePie modules are enabled. I create a new custom content type and enable FeedAPI, set Simplepie parser and -15 order, and FeedNode Processor. I set Page as default type. I set my feed to: http://rss.ireport.com/feeds/latest.rss Now I get my first response in the last four hours....
* 12 new item(s) were saved. 0 existing item(s) were updated.
* There are no new items in the feed.
My guess why it worked this round: 1. Common Parser didn't work for me even though I have PHP 5.2.6 and SimpleXML/xml/xmlreader/xmlwriter/xmlrpc compiled in. 2. Default Feed content type doesn't work since it doesn't save its Feed URL.
Update #3
Success was short lived. I deleted everything again to reproduce my results. I have all FeedAPI modules enabled. I created my own custom feed type, processor and parsers enabled, that creates page nodes. I get this error when I save.
warning: array_shift() [function.array-shift]: The argument should be an array in /Users/sdfsdf/Sites/carmen/cgv3/web/trunk/www/includes/form.inc on line 1315.
I then click refresh, I get. "0 new item(s) were saved. 12 existing item(s) were updated." There are *no new feed nodes* in my content list. I change the author of the feed from User 1 (admin) to some other person who has rights to create pages. I save and click refresh, now I get blank white pages (php white screen of death) with the URL http://cg-dev/node/162/refresh I click back to the view tab. I get.
* 0 new item(s) were saved. 12 existing item(s) were updated.
* There are no new items in the feed.
* There are no new items in the feed.
* There are no new items in the feed.
* There are no new items in the feed.
* There are no new items in the feed.
Update #4
I unchecked FeedAPI Inherit in the feed content type. I delete the feed node, the create a new feed node, save. I get the array_shift error on view tab. I click refresh tab, then get white screen of death Then I click remove items, I get the prompt to remove, but now I see... 12 new item(s) were saved. 0 existing item(s) were updated. I can see new page nodes that were created. In any case, I can't seem to get consistent results. Depending on which options I toggle, it seems to work sporadically. :-/
Comment #46
glassgrrl commentedSubscribing
Comment #47
jenna.tollersonSubscribing.
Comment #48
aron novakWell, it would be good to kill this bug :)
Anybody, who experience this bug, can you send me the database dump? Just use the contact form and send me an email and then we'll investigate.
Comment #49
DoktorNo commentedsubscribed - same problem
Comment #50
lisrael commentedSubscribing, same problem.
Comment #51
aron novak#48 - see this reply to see how you can help to catch this bug.
Saying "subscribe" is not helpful, i'm aware of the problem.
Comment #52
raffuk commented@Aron Novak
Did you get enough dbs? Can send you my one if you still need.
Thanks
Comment #53
aron novak@raffuk : no, i haven't got any DBs by now. So if you like to help, just use the contact form.
Comment #54
raffuk commentedThere you go (I hope I'm using the right form :) )
Let me know if I can help any further.
Comment #55
happysnowmantech commentedI think I'm seeing a variant of this problem. When I try to add a feed, I get this error:
* warning: Invalid argument supplied for foreach() in drupal-6.4\sites\all\modules\feedapi\feedapi.module on line 1279.
* Title could not be retrieved from feed.
I see the same error with both common & simplepie parsers. I'm using PHP5.
DB dump is attached. Strangely, even though I set up the feedapi modules & content types correctly (I hope!), all of the feedapi_* tables are empty. Not sure if that is expected.
Comment #56
webdev2 commentedsubscribing - have had same problem for two weeks. This is a prerequisite to getting memetracker to work.
Comment #57
webdev2 commentedwhat was the last WORKING version of this? Does anyone know and have tested?
Comment #58
lyricnz commentedI am having same problem:
- totally stock D6.4
- put simplepie.inc (1.1.1) into feedapi/parser_simplepie/
- enabled the three modules in "FeedAPI Default" section
- clicked create content, feed. Entered title and URL only (NO other changes). Clicked Save
- Error "warning: Invalid argument supplied for foreach() in XXX/sites/all/modules/feedapi/feedapi.module on line 1279.
This line is the foreach in
This function is called twice during this operation, once with $stage_type='processors' and once with $stage_type='parsers'. However $node_type_settings does NOT contain ['parsers'], which is what causes the error. Looking back at the create-node form, this is true - I don't see any parsers on the form in the Feed section (just the FeedAPI Node processor). Looking at the Feed content-type: SimplePie seems to default to OFF. I turned this on (BUG? should default to this anyway!).
Doesn't help. Still no parsers shown on the new-feed form. Long story short, parser_simplepie.module does not implement hook_feedapi_settings_form() so is therefore not added to the form. Meaning there is no parser, and causing the other errors. Investigating further now.
Comment #59
lyricnz commentedAdding a dummy settings-form to parser_simplepie.module fixed the immediate symptom reported.
Comment #60
chasz commented1.2 is still working but the poormanscron isnt updating it :(
Comment #61
webdev2 commentedMany thanks for the detective work.
It doesn't work with simple pie but it also throws the same error using php5 and the Common parser available for php 5.
Comment #62
lyricnz commentedDid you enable the parser in the Feed content-type, as well as add the method to the parser_simplepie.module? Did that make it show up on the create-feed form (a collapsible region with no contents, but title of Simplepie)? That's all it took to repair _this issue_ (for me).
Comment #63
raffuk commentedExactly - I was going to post it right now.
Good catch Lyricnz!
Comment #64
joe-b commentedI think the problem may be something to do with the data checking of _feedapi_insert() function in feedapi.module.
In order to insert the the new feed it requires both the feed->url and the feed->feed_type
The feed_type is taken from invoking hook_feedapi_feed() in _feedapi_call_parsers().
If the parser modules don't return a feed_type from their implementation of hook_feedapi_feed() then the INSERT fails.
So, maybe _feedapi_call_parsers() should do something like …
It works for me, at least.
Comment #65
Anonymous (not verified) commentedCan everyone be sure they have enabled one or more parsers for that content type (whatever each feed item will be saved as) - this fixed the error straight away for me.
Comment #66
chasz commentedi thought you are not supposed to enable the parsers in the feeditems....wasnt there a fixed to prevent errors for that scenario?
Comment #67
webdev2 commentedmy mum - would you mind detailing the steps you are doing so I am certain I am on the same track as you? Thanks.
Comment #68
ThePrince commentedI posted this in the version 5 of this bug, hope it helps:
http://drupal.org/node/294577#comment-1042503
Comment #69
chasz commentedyeah that may be short term fix, but would like a fix out of the box so new users dont have to run to the issues board
edit: didnt work by creating new feed contenttype, will try adding parsers to the feeditems
edit2: cant be done
edit3: is there a permission that has to be enabled? drupal permission or folder permission if cached somewhere?
Comment #70
jboeger commentedSubscribing... trying everything w/ fresh 6.4 install and latest feedapi/simplefeed. No worky.
Comment #71
smanes commentedI'm building a module that has FeedAPI as a dependency. Everything worked fine for days then suddenly FeedAPI wouldn't insert any new feeds. I figured that my module must have trashed something in FeedAPI so I uninstalled FeedAPI (completely) and reinstalled. I did this several times both with the 6.x-1.3 production and dev packages. Nothing I did would make FeedAPI work again.
I noticed that after uninstalling FeedAPI that there were still three feedapi_* variables set in the environment. After deleting those through Debug and reinstalling, FeedAPI started working again. Can't hurt to try it.
As to the:
* warning: Invalid argument supplied for foreach() in /home/adpost/domains/example.com/public_html/sites/all/modules/feedapi/feedapi.module on line 1281.
I struggled with this one for a half hour until I noticed that I'd neglected to enable a parser after the reinstallation. I enabled one in Content Management -> Content Types -> Feed and the error went away.
Comment #72
chasz commentedI noticed that after uninstalling FeedAPI that there were still three feedapi_* variables set in the environment. After deleting those through Debug and reinstalling, FeedAPI started working again. Can't hurt to try it.
can u explain how to do this?
Comment #73
smanes commentedInstall the Devel module:
http://drupal.org/project/devel
Then enable the Devel block. You'll see, among several nifty items, "Variable Editor".
Comment #74
chasz commentedLOL when i use a GUI for mysql i see many left behind variables.....shouldnt they be deleted when the module is uninstalled?
i also have so orphaned nodes.....how can i get rid of them from the DB ? are they all in the node* tables?
edit: after deleting all the feedapi variables and reinstalling
"
* 0 new item(s) were saved. 30 existing item(s) were updated.
* Feed [BBC UK] BBC World News has been created.
"
Comment #75
chasz commentedthere is a function that seemed to have been missing since version 1.2.....that is whether the feeditems should be updated along with bringing in new items, or the old items should be left alone as is.
anyone seen this function?
with the "aggregator" being removed it seems there may be some missing instructions to insert items rather than updating them...just a hunch
Comment #76
webdev2 commentedShould we even be using one that has so many manual work-arounds? I appreciate the developer's work, don't get me wrong. BUt I, and so many others, are having to find work-arounds, it makes one ponder such things.
All I wanted it for was memtracker and now I have spent many, MANY, hours trying to get this to work, still unsuccessfully, before I even get to the mod I really wanted.
Comment #77
kreynen commentedI was experiencing the same thing, but problem turned out to be an odd <?version1.0 ?> at the beginning of the feed I was trying to add. After that was removed, everything worked as expected.
Comment #78
jrabeemer commentedSimpleFeed 6.x-dev seems to be more stable. But currently it's broken when pulling data with the current Views2 module.
Comment #79
Krummrey commentedI tried it with a fresh install of drupal and todays version od feedAPI (6.1.3). Just uninstalling did not do the trick.
The feed gets parsed and Nodes are created.
However shouldn't the latest x items in the feed appear when I click on admin/content/feed/list -> feedname? They don't.
But the good news is that in general it works again! YEAH!
Comment #80
webdev2 commentedI don't understand. I've been working with 6.1.3 for a month now. How is today's version different if it;s still marked as 6.1.3?
Comment #81
aron novakI think jan krummrey wanted to mention -dev (he mentioned today version, that's why i think)
Comment #82
lyricnz commentedTry the current -dev : worked for me.
Comment #83
webdev2 commentedI might give that a try when I have time. Thanks.
Comment #84
aron novak1.4 is out. Please upgrade to this and see if the problem is gone away or not.
Comment #85
ahoria commentedFIXED!!!
Comment #86
smanes commentedI agree. All fixed (in 1.4)
Comment #87
jrabeemer commentedThe README is still out of date about enabling the views module.
Comment #88
greg.harveyNOT fixed. Very much active.
Clean install of 1.4 on Drupal 6.6. Save a feed with target content type of "News item", same old problem. Feed settings discarded and no content syndicated, AND the following warning:
Comment #89
iref-cmgr commentedNote: First post on Drupal.
I am having similar issue of feeds and feed items not being saved. Using v6.6, and latest feed_api module.
After waiting for days and also struggling for several hours on this, came up with a workaround that may be useful for folks trying to achieve the same thing as I was... creating a custom news page using feeds. As the feed items were not being saved, tried the Import OPML feature, and with this was successfully able to save the feed, with the feed items showing up in the contents page. (I call it a workaround as I am presuming there is a simpler way of doing this, but which eludes me).
Have posted my notes here on www.indiaref.net, which I (finally) upgraded to v6. Example news pages: infotech news page and education news page.
If I should post this somewhere else, please let me know. Thanks
Comment #90
aron novakgreg.harvey: can you attach here the dump of the variable table?
iref-cmgr: first, welcome on d.o. :) Did you see the same error message as greg.harvey?
Comment #91
iref-cmgr commentedAron,
No, I did not get the error message as greg.harvey, but same result nonetheless, i.e., feed and feed items were not being saved. The Import OPML feature worked however, and both feeds and feed items (on refresh) get saved. After seeing what this feature does, my guess (drupal newbie alert) is that the underpinnings (i.e., base code) for import opml and the regular add feed are the same. Perhaps there is a difference in how they get there and something gets dropped along the way?
Btw, thanks for the great work.
Comment #92
brokenlinx commentedI followed jlndrr's lead in post #38 and it resolved the issue for me.
_____________________________________________________________________________
I had the same problem in 5.7 ("Feed URL is discarded, feed items not saved")
And I solved it by changing the weight of the SimplePie Parser to -15 in the Feed content type Settings.
Comment #93
juliendorra commentedNot really fixed for me.
Previously (http://drupal.org/node/260670#comment-990186) I had some success playing with the weight of the parser.
Worked for others too : http://drupal.org/node/260670#comment-1115199
But now I'm trying to add another feed, and same old bug. ("Feed URL is discarded on submitting, feed items not saved")
I updated with 1.4, over my 5.7 install. No change.
So really, I'm not sure the bug is fixed.
Comment #94
juliendorra commentedAnyway, update :
created a new, specific Content Type for the feed I wanted to add.
It has the side effect of solving the bug.
Comment #95
greg.harveySorry for the delay on this - because I tried it on our active development server, I uninstalled it without taking a database snapshot, which was really dumb, but I now can't give you the variable table. I'll try to find time to re-install and replicate the issue in the next few weeks, and if I do I'll send the variables table. I'll also try to do the SimpleTest tests.
Comment #96
aron novakjlndrr: you mentioned that you created a new content-type and the bug disappeared, this is great!
In general:
If you're still experiencing this bug, simply drop the feedapi built-in content-type and use your own. It's likely that you still use the content-type which is created with a buggy, old version of FeedAPI. If use use >1.4 version of the FeedAPI, the only reason of the bug could be a buggy content-type.
Please reopen if you still experience this bug AFTER creating a brand new content-type.
Comment #97
mearns commented(re)enabling a parser (in my case Common syndication parser) worked for me ... I believe I was initially getting the problem because had both parsers enabled and was improperly messing with weights to get them both to work
Comment #98
greg.harveyGood news - on a clean installation of Drupal 6.7 with SimplePie parser this now works for me. Going to try it on our main application now. Wish me luck! =)
Edit: worked there too! This is, indeed, fixed.
Comment #99
jcamfield commentedWhat if I'm already using a custom content type for my feed-imported items? (Existing feeds continue to work on that content type, new ones don't) - creating a new "target" content type didn't seem to help at all.
Creating a new content type for the Feeds themselves also did nothing. When deleting the failed feeds, I get this :
warning: file_get_contents(http:) [function.file-get-contents]: failed to open stream: No such file or directory in /home/my-site-path/sites/all/modules/feedapi/parser_simplepie/simplepie.inc on line 7792.
(simplepie 1.1.2 is installed and in place) - this error seems to be because the node doesn't have the URL, however, so probably doesn't shed any light on the problem.
any other tricks I should try?
Comment #100
jcamfield commentedFWIW, installed 6.5, just upgraded to 6.8 and Feedapi 1.4->1.5 - could this problem stem from an update issue? Reinstalling the whole site from scratch (it was working fine last week ish?) is not really an option for me.
Comment #101
greg.harveyAron will probably ask for a dump of the variable table. If it's an update, it's possible there are some legacy variables messing things up. Have you actually tried replicating this behaviour with a clean installation of Drupal, just to be sure there is a problem with FeedAPI and not a problem with your specific setup?
Comment #102
jcamfield commented....and a few minutes later, going back to the original content type and after having disabled the common parser module, it's working for me. So -- kinda fixed??
Comment #103
jcamfield commentedAron - I can do better than a table dump if you're interested in playing with this problem; I can give you almost full access; ping me on skype or twitter.
Comment #104
jcamfield commentedBTW - as a note of warning to idiots like me, if you're using CSV Import, you'll encounter this error if you're also trying to process with SimplePie Parser, you only need the CSV Import!
Comment #106
voipfc commentedThis problem is still lurking.
The feed url is not saved. I worked around out by examining the relevant database record and making direct changes there.
Hopefully nothing serious will get broken
Comment #107
greg.harveyIf you meet the criteria here, please re-open the bug by setting the status to Active. =)
Comment #108
Krummrey commentedI have this issue once in a while. #355745: Feed not loading
Even with my own "newsfeed" type. It is frustrating. Especially since I have no idea how to pinpoint the problem.
Maybe you could offer some help on where to look. How do I find out where the problem lies?
Parsing, mapping, storing data? Is there a way to find out where it breaks?
Comment #109
Krummrey commentedI'm trying to get this feed into my site:
http://pipes.yahoo.com/pipes/pipe.run?_id=e8a51fd3be059d828a133e0ca3ec2a...
When I refresh the feed I get:
No content is being created though.
This feed however on the same installation gets parsed just fine:
http://www.stern.de/standard/rss.php?channel=lifestyle
Even the image-downloading thingy works on this one.
My setup:
Comment #110
Anonymous (not verified) commentedI'm going to suggest that perhaps the expected data in the XML isn't in the XML and therefore nothing is added to the database especially since it works with some but not all URL. http://www.validome.org/ provides a validator that can be used to test for errors.
Comment #111
voipfc commentedThe previous posters have noted something I wanted to mention earlier, but couldn't recreate the URL that failed.
In testing some other related code with the parse_url function I realized that it fails completely even when parts of the URL are correct - it even fails on parse_url($url, PHP_URL_HOST) even though that part is correct and is at second element of the url. The inserting of whole URL must be dependent on the whole URL, and it could be that parse_url fails on certain URLs which are considered valid by other parsers.
It may be time to break out the debugger and find out where and how.
Comment #112
jcamfield commentedI would like to verify that sometimes feeds which don't validate cause this exact behavior (and fail silently, so using a feed validator is a great tool to check if some of your feeds are doing this, but not all.
Comment #113
aron novakCan someone confirm if this still exists in 1.7beta2?
Comment #114
Coornail commentedSadly it is =(
I installed trace module, and found things that might be relevant:
Comment #115
pam.pkrweb@gmail.com commentedHi
I am having this same issue. But I get only one of the feed item when there are more and not the current date one. It is real strange works fine on 9 feed but not on 4 others. I did post my issue early see http://drupal.org/node/503556, has more detail. Sorry I missed this issue item. I did just look at the db tables and the feed items are not there. I did install FeedAPI and Mapper on dev site. Then only set up one of the feeds not working and still does not work. The node table has the feed and feed item however all the feedapi table are empty. I do not get any error messages. I am not sure how to help, newbie but willing to learn if provide steps. I have version installed are FeedAPI 6.x-1.6, FeedAPI Mapper ver 6.x-1.0-beta9 and SimplePie 1.1.3.
Forgot mention I did use the RSS Validator on feeds not work all 4 came back valid.
Update: Just add one of the Feeds that works to dev site. It work find got the feed and feed items all 20. Then looked at tables again. Now see data in the feedapi tables include the first feed that not working, but only has the one feed item. Hope this helps.
Thanks
Comment #116
momper commentedhttp://beta.feedvalidator.org/check.cgi?url=http%3A%2F%2Ferfurtblog.eu%2Frss.xml
http://www.fotografie-schwerin.de/feed
is not saved - are the errors the reason?
Comment #117
aron novakCoornail: Can you point me the revision where the line numberings are from?
Also, what did you do while tracing? A node update? Vanilla drupal + feedapi or tons of other modules?
Comment #118
Coornail commentedThe version was 1.7beta2.
The installation was drupal+nodeapi+feedapi mapper, nothing else.
I was updating a node without any success (the url went missing) if I remember correctly.
Comment #119
greg.harveyStill an issue for 6.x-1.7-beta3. =(
Automated tests were run and reported problems - most significant probably that it couldn't create a feed node. But there are no easy output options for SimpleTest at the moment and for some reason the results for this test are not going in to the database, using SimpleTest 6.x-2.8. Don't know why. Could be a problem with these tests, could be a problem with SimpleTest. The best I can do is copy and paste the mark-up from the SimpleTest results page (attached).
Installed modules are:
- FeedAPI
- FeedAPI Node
- FeedAPI Inherit
- Common Syndication Parser
Feed URL was:
- http://www.economist.com/rss/daily_columns_rss.xml
Now here's where it gets interesting. This URL was discarded on localhost but when the whole app was moved to my dev server and the feed URL was re-saved, it stuck. Database snapshot identical in both cases. Fails on localhost, succeeds on dev.
I think I'm having HTTP request issues on the local copy (though I don't know why). Is it possible FeedAPI discards the URL of the feed if a HTTP request fails? If so, this could be a cause. Better behaviour would be save the feed URL and warn on refresh (either in watchdog, Drupal message or both).
But anyway, my observations *suggest* this could be HTTP request status related.
Thoughts?
Comment #120
aron novakgreg.harvey: I tried to find out if it's related to inaccessible feeds. I copied a feed to localhost, added the feed, delete the feed behind it, the feed URL was still there in the database.
I have another guess: what are the php version on your dev server versus your local dev environment?
Comment #121
Coornail commentedI do have the same problem with 6.x-1.7-beta3 beta also.
I forgot to mention that I was using the SimplePie parser.
My local php version is
dev-lang/php-5.2.10But it was the same with
dev-lang/php-5.2.9-r2Comment #122
greg.harvey@Aron Novak:
local
PHP Version 5.2.6
System: Linux 2.6.27.21-170.2.56.fc10.i686 #1 SMP Mon Mar 23 23:37:54 EDT 2009 i686
Apache Version: Apache/2.2.11 (Fedora)
dev
PHP Version 5.2.0
System: Linux 2.6.18-028stab062.3-ent #1 SMP Thu Mar 26 15:12:05 MSK 2009 i686
Apache Version: Apache/2.0.52 (CentOS)
Comment #123
aron novakAccording to Coornail's trace, i propose a patch here. I'm in doubt that this will really help. Anyway, Can you give it a try, those who can steadily reproduce this bug?
Comment #124
Coornail commentedI runned simpletest, with and without the patch:
413 passes, 2 fails, and 3 exceptionsWarnings were cache related, the errors:
Comment #125
greg.harveyPatch in #123 doesn't work for me. Sorry.
But I had way more errors in the test results than Coornail (see #119) - I attached full mark-up of the SimpleTest results table there which should tell a better story, if you get a chance to look at it.
Comment #126
aron novakFeedAPI simpletest is ok at localhost (php5.2.6), at a vps host, it's not 100% ok (1 fail, (php5.2.9)
Comment #127
aron novakfeedapi simpletest is ok at localhost (php5.2.6), at a vps host, it's not 100% ok (php5.2.9) Problematic case: "The feed with immediate refresh setting was refreshed."
Digging further
Comment #128
aron novakThe php guys fixed some simplexml errors since php5.2.6, and it seems it causes problems in parser_common_syndication. With parser_simplepie, the tests are fine at both hosts. Digging deeper again :)
Comment #129
greg.harveyShould I try SimplePie on my localhost and see if it helps?
Still a mystery as to why the parser not working would cause FeedAPI to discard the feed URL though... =/
Comment #130
aron novakgreg.harvey: yeah, would be an enormous help if you could try it with simplepie only. First, try to manually reproduce the bug. After you turn on simplepie, do not forget to adjust the content-type as well.
To run simpletests only for parser_simplepie, turn off entirely the other parser at admin/build/modules
"Still a mystery" - yes, for me also :( Maybe the parser returns something nasty. I'm on the way to found out what's wrong.
Comment #131
greg.harveyTried SimplePie on localhost. Sadly it made no difference. =(
Comment #132
Coornail commentedThe same error on debian stable:
Comment #133
tamasd commentedSame error on a clean openatrium install.
When I save the node, and get back to the edit form, I noticed that _every_ setting in the "Feed" fieldset reset to its default value.
The server data is the same as in #132
Comment #134
tamasd commentedHappens on localhost also, on a completely clean openatrium install.
OS: Ubuntu 9.04
Comment #135
tamasd commentedI think I've found the bug:
This is the relevant part of the node object what the _feedapi_update() gets on page update. _feedapi_update() calls the node_load() to get the old node object, where $old_config->feed->nid does not exists since the feedapi table is empty. After that _feedapi_build_feed_object() is called, and as you can see from the node object dump above, the second parameter will be NULL, since it is not defined. The resulting object's url field will be also NULL, that is why the isset() will return false in _feedapi_insert(), and skips the database insert.
Comment #136
aiwata55 commentedSubscribe. Having the same problem.
Drupal 6.13
FeedAPI 6.x-1.7-beta3
FeedAPI Node 6.x-1.7-beta3
SimplePie 1.2
Common Syndication Parser 6.x-1.7-beta3
Comment #137
gerhard killesreiter commentedI am having this error too. In my case it was a feed that wasn't accepted as a feed that made the parser function return FALSE and unset the link url before it could get inserted...
Comment #138
aron novakI was able to reproduce Gerhard Killesreiter's issue.
I attached a patch both for #137 and #135, these seem to be different, because #137 may appear on inserts, #135 is only related to updates.
Yorirou: "does not exists since the feedapi table is empty" - how is it possible? You have a node already with some feedapi info. Ah, i have one guess: you have a node with a non-feedapi content type, you enable feedapi for that content-type and then trying to add the feed info to that node, right?
Comment #139
alex_b commented#139:
Looking great.
One nitpick: Rather than dancing around the return value of _feedapi_call_parsers(), the function should not damage the $feed object if there are no valid results by parsers.
Comment #140
aron novakthe patch is updated according to #139.
Comment #141
gerhard killesreiter commentedThis patch mostly works for me. I now get a message
Could not refresh feed.
when I create the feed node, but the feed url gets saved.
To get the error message is correct since the parser doesn't understand my feed.
However, when I edit and save the node again, I get:
User warning: Duplicate entry '105' for key 1 query: INSERT INTO feedapi ( nid, url, link, feed_type, processors, parsers, checked, settings) VALUES (105, 'http://dev.xxxxxxxxxx.com/product_feed.rss', '', '', 'a:1:{i:0;s:12:\"feedapi_node\";}', 'a:1:{i:0;s:25:\"parser_common_syndication\";}', 0, 'a:0:{}') in /home/killes/checkouts/contributions-6/modules/feedapi/feedapi.module on line 929.
Comment #142
aron novak#141: thanks for the reply, however i could not reproduce that issue. What did you edit actually on the node when you re-saved?
Other, which revision of feedapi.module do you use? The latest is 1.23.2.119.2.71 and it seems that you use an older one, i guess because of the line numbering, line 929 is comment here.
Comment #143
gerhard killesreiter commentedIndeed, I didn't have the latest version.
Good to go.
Comment #144
tamasd commentedThere is a content type called "feed". I post a content without filling any feedapi information. After that I edit the content and I try to add the feedapi information.
Comment #145
aron novakYorirou: can you test the patch in #140 ?
Comment #146
tamasd commentedI applied the patch on the latest -dev, and it saves the information, however it says "Could not refresh feed".
Comment #147
tamasd commentedproblem solved, it was my fault, the patch works
Comment #148
aron novakThank you guys who helped to clarify this issue! I committed the patch now.
Follow-up issue: #542670: Test those feed URLs what are inaccessible for the parser
Comment #149
erik seifert commentedPatch work. But i use Google Alerts URL looks like this:
feed://google.com/alerts/.....
After editing URL looks like this:
http://my.domain.de/feed://google.com/alerts/.....
Before patch this feature works ;- )
Comment #150
aron novakThis is unrelated. It's not because of this patch.
it seems that url is not valid absolute url according to drupal's valid_url() and that's why feedapi tries to make it absolute.
Comment #151
aiwata55 commentedI have the same problem as described in #149.
I am trying to create nodes from a blip.tv feed.
While the feed field of a "Feed" content type node is now saved, thanks to FeedAPI 6.x-1.x-dev and Feed Element Mapper 6.x-2.x-dev, the saved url is different from the original. My drupal installation's URL is attached to the beginning.
For example, if
- blip.tv feed address ... feed://example.blip.tv/rss
- my Drupal site address ... http://www.example.com/
then, the saved data in the feed field will be,
- http://www.example.comfeed://example.blip.tv/rss
If this problem happens because the feed url is not valid absolute url as Aron says, what can/should I do?
Comment #152
aron novakComment #153
Coornail commentedHuhh, thank you \o/
Comment #154
dtrdewaele commentedHad the same problem. I was using also using the Boost module. I changed the weight for Feedapi in the system table so I comes before boost and the problem was fixed!