Feed URL is discarded, feed items not saved

yelvington - May 20, 2008 - 14:42
Project:FeedAPI
Version:6.x-1.4
Component:User interface
Category:bug report
Priority:critical
Assigned:Unassigned
Status:postponed (maintainer needs more info)
Description

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.

#1

yelvington - May 20, 2008 - 15:06

Update:

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.

#2

bflora - May 23, 2008 - 01:49

Having same problem. Subscribe.

#3

xamount - May 23, 2008 - 17:43

You 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.

#4

phani - May 23, 2008 - 18:06

exactly 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.

#5

bflora - May 23, 2008 - 20:38

I 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

#6

intropedro - July 3, 2008 - 11:42

I 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.

#7

SteveJB - July 21, 2008 - 16:22

Try setting the weight of the parser (simplepie or XML) to -15. That should fix the issue.

#8

alex_b - July 28, 2008 - 13:18

@yelvington: did #7 help?

#9

geodaniel - July 29, 2008 - 15:52
Title:Feed URL is discarded» Feed URL is discarded, feed items not saved

Closed #288492: Can't get feedapi to function at all - SimpleFeed works fine as a duplicate of this.

#10

geodaniel - July 29, 2008 - 16:55

I'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.

#11

greg.harvey - July 29, 2008 - 16:56

Does #7 refer to the system table in the database? Module weight?

#12

SteveJB - July 29, 2008 - 17:09

Its 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.

#13

wisdom - July 30, 2008 - 04:33

I 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.

#14

Erco - July 31, 2008 - 20:04

Don'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

#15

greg.harvey - August 1, 2008 - 10:49

This is a Drupal 6 thread referring to the latest Drupal 6 release, so upgrade is not an option for us.

#16

ahoria - August 6, 2008 - 10:44

subscribing

* 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.

#17

iqbal.pakistan - August 6, 2008 - 11:05

I have a https URL as feed URL , but SimplePie parser module is not supporting https feed. Can you tell me the solution?

#18

greg.harvey - August 6, 2008 - 14:16

@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! =)

#19

greg.harvey - August 11, 2008 - 10:26

@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.

#20

greg.harvey - August 11, 2008 - 10:36
Priority:normal» critical

This 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. =(

#21

fm - August 12, 2008 - 22:48

I am experiencing this same problem under FeedAPI 5.x-1.2

#22

greg.harvey - August 12, 2008 - 23:30

@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. =(

#23

wisdom - August 15, 2008 - 21:33

So 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.

#24

ahoria - August 15, 2008 - 13:30
Version:6.x-1.2» 6.x-1.x-dev

Issue remains in the 2008-Aug-14 dev build. FeedApi not usable at all.

#25

samc - August 17, 2008 - 23:22

Same problem here w/ latest dev download. Niether simplepie nor common syndication parser work. Php 5.2.5.

#26

Aron Novak - August 18, 2008 - 17:41

Need 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.

#27

ahoria - August 19, 2008 - 11:26

I 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.

#28

greg.harvey - August 19, 2008 - 15:42

SimplePie:

- 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! =)

#29

Aron Novak - August 20, 2008 - 20:43

Well, I could not reproduce your problem. In order to find the problem, can you attach the {variable} table dump?

#30

caole261188 - August 21, 2008 - 05:06

This 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.

#31

caole261188 - August 21, 2008 - 05:12

More 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.

#32

Aron Novak - August 21, 2008 - 09:54
Status:active» postponed (maintainer needs more info)

caole261188: Needs more info: parser name, output of select * from feedapi where url like '%scriptlance%';, output of select * 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.

#33

greg.harvey - August 21, 2008 - 10:26

I 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! =)

#34

Aron Novak - August 21, 2008 - 10:51

greg.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.

#35

caole261188 - August 21, 2008 - 12:22

Hi,

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.

AttachmentSize
variable.txt 3.36 KB

#36

momper - August 28, 2008 - 15:11

same 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

#37

momper - August 28, 2008 - 15:16

Common Syndication Parser
url to test: http://www.bar-blog.de/feed/

#38

juliendorra - September 1, 2008 - 22:46

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.

#39

greg.harvey - September 1, 2008 - 23:26

If 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. =(

#40

momendo - September 5, 2008 - 00:07
Version:6.x-1.x-dev» 6.x-1.3

I 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.

#41

momendo - September 5, 2008 - 00:47

I 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.

#42

Aron Novak - September 5, 2008 - 07:16

"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.

#43

momendo - September 5, 2008 - 12:22

So 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.

#44

Aron Novak - September 5, 2008 - 12:09

Quote from the README.txt:

To get things working you must enable at least one parser and one processor.

#45

momendo - September 5, 2008 - 14:21

I 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. :-/

#46

glassgrrl - September 5, 2008 - 15:47

Subscribing

#47

jenna.tollerson - September 7, 2008 - 16:15

Subscribing.

#48

Aron Novak - September 15, 2008 - 09:21

Well, 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.

#49

DoktorNo - September 16, 2008 - 11:05

subscribed - same problem

#50

lisrael - September 16, 2008 - 17:49

Subscribing, same problem.

#51

Aron Novak - September 16, 2008 - 18:01

#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.

#52

raffuk - September 23, 2008 - 15:30

@Aron Novak
Did you get enough dbs? Can send you my one if you still need.

Thanks

#53

Aron Novak - September 23, 2008 - 15:53

@raffuk : no, i haven't got any DBs by now. So if you like to help, just use the contact form.

#54

raffuk - September 23, 2008 - 17:43

There you go (I hope I'm using the right form :) )

Let me know if I can help any further.

AttachmentSize
raffuk_db_sql.zip 284.77 KB

#55

happysnowmantech - September 23, 2008 - 20:38

I 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.

AttachmentSize
dbexport.sql_.zip 149.53 KB

#56

webdev2 - September 23, 2008 - 20:50

subscribing - have had same problem for two weeks. This is a prerequisite to getting memetracker to work.

#57

webdev2 - September 25, 2008 - 17:03

what was the last WORKING version of this? Does anyone know and have tested?

#58

lyricnz - September 28, 2008 - 04:01

I 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

<?php
function _feedapi_format_settings($node_type_settings, $stage_type) {
 
$result = array();
 
$settings = $node_type_settings[$stage_type];
  foreach (
$settings as $name => $properties) {
?>

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.

#59

lyricnz - September 28, 2008 - 04:19

Adding a dummy settings-form to parser_simplepie.module fixed the immediate symptom reported.

<?php
function parser_simplepie_feedapi_settings_form($type) {
  return array();
}
?>

#60

chasz - September 28, 2008 - 12:34

1.2 is still working but the poormanscron isnt updating it :(

#61

webdev2 - September 28, 2008 - 22:43

Many 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.

#62

lyricnz - September 28, 2008 - 22:59

Did 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).

#63

raffuk - September 29, 2008 - 05:25

Exactly - I was going to post it right now.

Good catch Lyricnz!

#64

joe-b - September 30, 2008 - 12:42

I 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

if (isset($node->feed->url) && isset($node->feed->feed_type)) {
    db_query("INSERT INTO {feedapi} (
            nid, url, link, feed_type, processors,
            parsers, checked, settings) VALUES
            (%d, '%s', '%s', '%s', '%s', '%s', %d, '%s')",
      $node->nid,
      $node->feed->url,
      $node->feed->options->link,
      $node->feed->feed_type,
      serialize($node->feed->processors),
      serialize($node->feed->parsers),
      0,
      serialize(array())
    );

The feed_type is taken from invoking hook_feedapi_feed() in _feedapi_call_parsers().

    $feed->feed_type =  module_invoke($parser_primary, 'feedapi_feed', 'compatible', $feed);

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 …

    $feed->feed_type =  module_invoke($parser_primary, 'feedapi_feed', 'compatible', $feed);
    if (!$feed->feed_type) {
  $feed->feed_type = module_invoke($parser_primary, 'feedapi_feed', 'type', $feed);
    }

It works for me, at least.

#65

my mum - October 1, 2008 - 13:53

Can 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.

#66

chasz - October 1, 2008 - 15:03

i thought you are not supposed to enable the parsers in the feeditems....wasnt there a fixed to prevent errors for that scenario?

#67

webdev2 - October 1, 2008 - 15:10

my mum - would you mind detailing the steps you are doing so I am certain I am on the same track as you? Thanks.

#68

ThePrince - October 3, 2008 - 20:45

I posted this in the version 5 of this bug, hope it helps:

http://drupal.org/node/294577#comment-1042503

#69

chasz - October 4, 2008 - 11:03

yeah 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?

#70

jboeger - October 8, 2008 - 05:11

Subscribing... trying everything w/ fresh 6.4 install and latest feedapi/simplefeed. No worky.

#71

smanes - October 9, 2008 - 02:27

I'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.

#72

chasz - October 9, 2008 - 02:45

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.

can u explain how to do this?

#73

smanes - October 9, 2008 - 03:36

Install the Devel module:

http://drupal.org/project/devel

Then enable the Devel block. You'll see, among several nifty items, "Variable Editor".

#74

chasz - October 9, 2008 - 10:52

LOL 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.

"

#75

chasz - October 9, 2008 - 11:13

there 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

#76

webdev2 - October 9, 2008 - 12:33

Should 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.

#77

kreynen - October 9, 2008 - 17:48

I 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.

#78

momendo - October 9, 2008 - 17:52

SimpleFeed 6.x-dev seems to be more stable. But currently it's broken when pulling data with the current Views2 module.

#79

Jan Krummrey - October 10, 2008 - 11:45

I 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!

#80

webdev2 - October 10, 2008 - 13:17

I 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?

#81

Aron Novak - October 10, 2008 - 13:21

I think jan krummrey wanted to mention -dev (he mentioned today version, that's why i think)

#82

lyricnz - October 10, 2008 - 13:58

Try the current -dev : worked for me.

#83

webdev2 - October 10, 2008 - 15:18

I might give that a try when I have time. Thanks.

#84

Aron Novak - October 10, 2008 - 16:05

1.4 is out. Please upgrade to this and see if the problem is gone away or not.

#85

ahoria - October 10, 2008 - 17:35

FIXED!!!

#86

smanes - October 11, 2008 - 21:51

I agree. All fixed (in 1.4)

#87

momendo - October 12, 2008 - 01:00

The README is still out of date about enabling the views module.

#88

greg.harvey - October 27, 2008 - 13:44
Version:6.x-1.3» 6.x-1.4
Status:postponed (maintainer needs more info)» active

NOT 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:

warning: Invalid argument supplied for foreach() in C:\projects\svn_trunk\www\sites\all\modules\contribs\feedapi\feedapi.module on line 1291.

#89

iref-cmgr - November 8, 2008 - 22:22

Note: 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

#90

Aron Novak - November 10, 2008 - 07:22

greg.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?

#91

iref-cmgr - November 10, 2008 - 13:28

Aron,

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.

#92

brokenlinx - November 19, 2008 - 01:35

I 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.

#93

juliendorra - November 24, 2008 - 12:16

Not 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.

#94

juliendorra - November 24, 2008 - 12:29

Anyway, update :

created a new, specific Content Type for the feed I wanted to add.

It has the side effect of solving the bug.

#95

greg.harvey - November 24, 2008 - 12:52

greg.harvey: can you attach here the dump of the variable table?

Sorry 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.

#96

Aron Novak - December 4, 2008 - 21:32
Status:active» fixed

jlndrr: 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.

#97

mearns - December 5, 2008 - 13:36

(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

#98

greg.harvey - December 15, 2008 - 14:54

Good 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.

#99

jcamfield - December 15, 2008 - 22:47
Status:fixed» postponed (maintainer needs more info)

What 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?

#100

jcamfield - December 15, 2008 - 22:56

FWIW, 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.

#101

greg.harvey - December 15, 2008 - 23:10

Aron 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?

#102

jcamfield - December 15, 2008 - 23:11
Status:postponed (maintainer needs more info)» fixed

....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??

#103

jcamfield - December 16, 2008 - 17:22

Aron - 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.

#104

jcamfield - December 23, 2008 - 19:59

BTW - 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!

#105

System Message - January 6, 2009 - 20:00
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

#106

voipfc - January 8, 2009 - 20:32

This 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

#107

greg.harvey - January 8, 2009 - 22:01

If you meet the criteria here, please re-open the bug by setting the status to Active. =)

#108

Jan Krummrey - January 12, 2009 - 11:23

I 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?

#109

Jan Krummrey - January 12, 2009 - 16:45
Status:closed» active

I'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:

25 new item(s) were saved. 0 existing item(s) were updated.

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:

Drupal 6.8
MySQL database 5.0.51a
PHP 5.2.42-servage8
PHP memory limit 32M
PHP register globals Disabled
SimplePie Parser Installed correctly
The current installed version of SimplePie is 1.1.1
Unicode library PHP Mbstring Extension
Update notifications Enabled
Web server Apache

#110

earnie - January 16, 2009 - 18:18
Version:6.x-1.4» 6.x-1.5

I'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.

#111

voipfc - January 17, 2009 - 15:44
Version:6.x-1.5» 6.x-1.4

The 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.

#112

jcamfield - March 12, 2009 - 18:54

I 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.

#113

Aron Novak - June 29, 2009 - 12:29
Status:active» postponed (maintainer needs more info)

Can someone confirm if this still exists in 1.7beta2?

#114

Coornail - June 30, 2009 - 11:59

Sadly it is =(

I installed trace module, and found things that might be relevant:

#7945ed90 T+0.852285 [NOTICE ] E_STRICT: Creating default object from empty value in `sites/default/modules/feedapi/feedapi.module':1304
#7945ed90 T+0.857918 [NOTICE ] E_NOTICE: Undefined property: stdClass::$feed in `sites/default/modules/feedapi/feedapi.module':925
#7945ed90 T+0.858283 [NOTICE ] E_NOTICE: Trying to get property of non-object in `sites/default/modules/feedapi/feedapi.module':925
#7945ed90 T+0.858584 [NOTICE ] E_NOTICE: Undefined property: stdClass::$url in `sites/default/modules/feedapi/feedapi.module':926

#115

pamreed - July 1, 2009 - 04:52

Hi
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

 
 

Drupal is a registered trademark of Dries Buytaert.