After creation feed content or after update, there is following error:

warning: Invalid argument supplied for foreach() in /home/sites/potrawy.me/public_html/sites/all/modules/contributions/feedapi/feedapi.module on line 1308.

When I'm going to update it, all settings about Feed URL, Node Type of feed items, etc. are gone.

CommentFileSizeAuthor
#11 348780_notices_no_parser.patch2.25 KBalex_b

Comments

kenorb’s picture

Probably I haven't enabled any parser.
But it's an issue, because it should show some warning or not allow you submit Feed without parser.

aron novak’s picture

Status: Active » Postponed (maintainer needs more info)

Can you send me the variable SQL table? (with the wrong content-type settings) I could not reproduce the error.
Anyway, can you tell me what is the CVS revision of your code? The line number does not help, because in my latest version at that line there is a comment :)

likewhoa’s picture

same issue and this is with latest -dev copy. there should really be a warning when no parse is enabled as I actually didn't even enabled it by accident.

aron novak’s picture

likewhoa: can you paste here the exact error message? At the original error msg, the line numbering is not from the latest dev package.

siteograf’s picture

Downloaded latest FeedAPI 6.x-1.5 and have the same problem after creating or refreshing...

warning: Invalid argument supplied for foreach() in /home/content/g/l/o/globalmanaged/html/modules/feedapi/feedapi.module on line 1308.

siteograf’s picture

1308: foreach ($settings as $name => $properties) {
1309: if (isset($properties['enabled'])) {
1310: if ($properties['enabled'] == TRUE) {
1311: $result[$properties['weight']] = $name;
1312: }
1313: }
1314: }

siteograf’s picture

Message disappear after enabling Common syndication parser add on.
It's good idea to create warning message that feedAPI doesn't work without Common syndication parser enabled.

bethhauck’s picture

I've got the same error when I save the node, only mine is on line 1312, and I do have Common syndication parser enabled.

FeedAPI must not be finding it, though. If I hit the refresh tab on the page, I get the Invalid argument supplied for foreach() error, followed by "No processors specified for URL (my feed url). Could not refresh," followed by a second copy of the Invalid argument supplied for foreach() error.

Am I missing something?

a.mikheychik’s picture

It's very simple problem: just enable both feedapi_node and feed_simplepie...

For developers of this module: please, write about this not only in modules page, but on the page of project. It will be very helpful

howartp’s picture

Just to try and help with this, I get this error when Drupal is unable to read the .ics file within my Drupal site due to the 'HTTP request status' showing as failed on the /admin/reports/status page.

I have two Drupal sites, neither of which can read the .ics file on their own server. However both can read each other's .ics file with no problem.

So for the time being, I'm just hosting each diary on the 'wrong' server.

Peter

alex_b’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new2.25 KB

This patch should fix the problems described above.

The underlying problem is that if no parsers or processors are enabled, foreach() is being executed on an empty variable.

tim.plunkett’s picture

Status: Needs review » Reviewed & tested by the community

This patch looks good to me.
I have the same issue (no parser enabled).
When will this be committed?

aron novak’s picture

Status: Reviewed & tested by the community » Fixed

I also tested it and it works fine. Committed.

Status: Fixed » Closed (fixed)

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