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.

Comments

yelvington’s picture

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.

bflora’s picture

Having same problem. Subscribe.

xamount’s picture

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.

phani’s picture

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.

bflora’s picture

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

intropedro’s picture

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.

stevebayerin’s picture

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

alex_b’s picture

@yelvington: did #7 help?

geodaniel’s picture

Title: Feed URL is discarded » Feed URL is discarded, feed items not saved
geodaniel’s picture

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.

greg.harvey’s picture

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

stevebayerin’s picture

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.

wisdom’s picture

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.

Erco’s picture

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

greg.harvey’s picture

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

ahoria’s picture

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.

iqbal.pakistan’s picture

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

greg.harvey’s picture

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

greg.harvey’s picture

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

greg.harvey’s picture

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

fm’s picture

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

greg.harvey’s picture

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

wisdom’s picture

Version: 6.x-1.x-dev » 6.x-1.2

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.

ahoria’s picture

Version: 6.x-1.2 » 6.x-1.x-dev

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

samc’s picture

Version: 6.x-1.2 » 6.x-1.x-dev

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

aron novak’s picture

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.

ahoria’s picture

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.

greg.harvey’s picture

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

aron novak’s picture

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

caole261188’s picture

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.

caole261188’s picture

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.

aron novak’s picture

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.

greg.harvey’s picture

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

aron novak’s picture

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.

caole261188’s picture

StatusFileSize
new3.36 KB

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.

momper’s picture

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

momper’s picture

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

juliendorra’s picture

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.

greg.harvey’s picture

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

jrabeemer’s picture

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.

jrabeemer’s picture

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.

aron novak’s picture

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

jrabeemer’s picture

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.

aron novak’s picture

Quote from the README.txt:

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

jrabeemer’s picture

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

glassgrrl’s picture

Subscribing

jenna.tollerson’s picture

Subscribing.

aron novak’s picture

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.

DoktorNo’s picture

subscribed - same problem

lisrael’s picture

Subscribing, same problem.

aron novak’s picture

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

raffuk’s picture

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

Thanks

aron novak’s picture

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

raffuk’s picture

StatusFileSize
new284.77 KB

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

Let me know if I can help any further.

happysnowmantech’s picture

StatusFileSize
new149.53 KB

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.

webdev2’s picture

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

webdev2’s picture

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

lyricnz’s picture

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

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.

lyricnz’s picture

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

function parser_simplepie_feedapi_settings_form($type) {
  return array();
}
chasz’s picture

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

webdev2’s picture

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.

lyricnz’s picture

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

raffuk’s picture

Exactly - I was going to post it right now.

Good catch Lyricnz!

joe-b’s picture

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.

Anonymous’s picture

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.

chasz’s picture

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

webdev2’s picture

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

ThePrince’s picture

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

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

chasz’s picture

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?

jboeger’s picture

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

smanes’s picture

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.

chasz’s picture

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?

smanes’s picture

Install the Devel module:

http://drupal.org/project/devel

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

chasz’s picture

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.

"

chasz’s picture

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

webdev2’s picture

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.

kreynen’s picture

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.

jrabeemer’s picture

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

Krummrey’s picture

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!

webdev2’s picture

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?

aron novak’s picture

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

lyricnz’s picture

Try the current -dev : worked for me.

webdev2’s picture

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

aron novak’s picture

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

ahoria’s picture

FIXED!!!

smanes’s picture

I agree. All fixed (in 1.4)

jrabeemer’s picture

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

greg.harvey’s picture

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.
iref-cmgr’s picture

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

aron novak’s picture

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?

iref-cmgr’s picture

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.

brokenlinx’s picture

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.

juliendorra’s picture

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.

juliendorra’s picture

Anyway, update :

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

It has the side effect of solving the bug.

greg.harvey’s picture

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.

aron novak’s picture

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.

mearns’s picture

(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

greg.harvey’s picture

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.

jcamfield’s picture

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?

jcamfield’s picture

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.

greg.harvey’s picture

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?

jcamfield’s picture

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

jcamfield’s picture

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.

jcamfield’s picture

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!

Status: Fixed » Closed (fixed)

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

voipfc’s picture

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

greg.harvey’s picture

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

Krummrey’s picture

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?

Krummrey’s picture

Status: Closed (fixed) » 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

Anonymous’s picture

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.

voipfc’s picture

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.

jcamfield’s picture

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.

aron novak’s picture

Status: Active » Postponed (maintainer needs more info)

Can someone confirm if this still exists in 1.7beta2?

Coornail’s picture

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
pam.pkrweb@gmail.com’s picture

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

momper’s picture

aron novak’s picture

Coornail: 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?

Coornail’s picture

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

greg.harvey’s picture

Version: 6.x-1.4 » 6.x-1.7-beta3
StatusFileSize
new124.78 KB

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

aron novak’s picture

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

Coornail’s picture

I 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.10
But it was the same with dev-lang/php-5.2.9-r2

greg.harvey’s picture

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

aron novak’s picture

StatusFileSize
new871 bytes

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

Coornail’s picture

I runned simpletest, with and without the patch:
413 passes, 2 fails, and 3 exceptions
Warnings were cache related, the errors:

  • The feed with immediate refresh setting was refreshed. Line 425
  • The item node really appears on the first page. 493
greg.harvey’s picture

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

aron novak’s picture

FeedAPI simpletest is ok at localhost (php5.2.6), at a vps host, it's not 100% ok (1 fail, (php5.2.9)

aron novak’s picture

feedapi 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

aron novak’s picture

The 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 :)

greg.harvey’s picture

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

aron novak’s picture

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

greg.harvey’s picture

Tried SimplePie on localhost. Sadly it made no difference. =(

Coornail’s picture

The same error on debian stable:

php 5.2.6.dfsg.1-1+lenny3
apache 2.2.9-10+lenny4
feedapi openatrium standard (6.x-1.6)
feedapi_mapper openatrium standard (6.x-1.0-beta9)
tamasd’s picture

Same 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

tamasd’s picture

Happens on localhost also, on a completely clean openatrium install.

OS: Ubuntu 9.04

$ php -v
PHP 5.2.6-3ubuntu4.1 with Suhosin-Patch 0.9.6.2 (cli) (built: Apr 23 2009 14:35:05) 
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
    with Xdebug v2.0.3, Copyright (c) 2002-2007, by Derick Rethans
    with Suhosin v0.9.27, Copyright (c) 2007, by SektionEins GmbH
tamasd’s picture

Version: 6.x-1.7-beta3 » 6.x-1.6
Status: Postponed (maintainer needs more info) » Active

I think I've found the bug:

object(stdClass)[475]
...
  public 'feedapi' => 
    array
      'feedapi_url' => string 'http://localhost/rss.xml'
      'refresh_on_create' => int 0
      'update_existing' => int 1
      'skip' => int 0
      'items_delete' => string '0' (length=1)
      'processors' => 
        array
          'feedapi_node' => 
            array
              'content_type' => string 'admin_message' (length=13)
              'node_date' => string 'feed' (length=4)
              'promote' => string '0' (length=1)
              'x_dedupe' => string '0' (length=1)
  public 'feedapi_object' => 
    object(stdClass)[452]
      public 'link' => string '' (length=0)
  public 'feed' => 
    object(stdClass)[452]
      public 'link' => string '' (length=0)
...

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.

aiwata55’s picture

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

gerhard killesreiter’s picture

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

aron novak’s picture

StatusFileSize
new1.46 KB

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

alex_b’s picture

Status: Active » Needs work

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

-    $feed = _feedapi_call_parsers($feed, $feed->parsers, $node_type_settings['parsers']);
+    $parser_result = _feedapi_call_parsers($feed, $feed->parsers, $node_type_settings['parsers']);
+    $feed = is_object($parser_result) ? $parser_result : $feed;
aron novak’s picture

Version: 6.x-1.6 » 6.x-1.x-dev
Status: Needs work » Needs review
StatusFileSize
new1.73 KB

the patch is updated according to #139.

gerhard killesreiter’s picture

Status: Needs review » Needs work

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

aron novak’s picture

Status: Needs work » Postponed (maintainer needs more info)

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

gerhard killesreiter’s picture

Status: Postponed (maintainer needs more info) » Reviewed & tested by the community

Indeed, I didn't have the latest version.

Good to go.

tamasd’s picture

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

aron novak’s picture

Yorirou: can you test the patch in #140 ?

tamasd’s picture

Status: Reviewed & tested by the community » Active

I applied the patch on the latest -dev, and it saves the information, however it says "Could not refresh feed".

tamasd’s picture

Status: Active » Reviewed & tested by the community

problem solved, it was my fault, the patch works

aron novak’s picture

Status: Reviewed & tested by the community » Fixed

Thank 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

erik seifert’s picture

Version: 6.x-1.x-dev » 6.x-1.7-beta3

Patch 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 ;- )

aron novak’s picture

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

aiwata55’s picture

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

aron novak’s picture

Status: Fixed » Closed (fixed)
Coornail’s picture

Huhh, thank you \o/

dtrdewaele’s picture

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