Closed (fixed)
Project:
FileField Podcaster
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
11 Nov 2008 at 16:27 UTC
Updated:
19 Oct 2010 at 10:26 UTC
Jump to comment: Most recent file
Comments
Comment #1
Rob_Feature commentedAre you running the latest versions of Views and CCK? I'm not seeing this error in any of my installations. Please post all version numbers that you're running for:
-FFPC
-Views
-CCK
-FileField
Comment #2
xenghis commentedI have the same warning, but the mp3 shows up fine.
-FFPC 6.x-0.7
-Views 6.x-2.1
-CCK 6.x-2.1
-FileField 6.x-3.0-alpha5
Comment #3
jesusrocksmyfaceoff commentedI am getting a similar error with themeing the view (added a page display). The error is this:
warning: Invalid argument supplied for foreach() in /home/newcr4/public_html/v2/sites/all/modules/views/theme/views-view-table.tpl.php on line 22.
I haven't been able to deduce if this is a FFPC issue or a Views issue, or both. I have the most recent (non -dev) versions of FFPC, Views, CCK, FileField.
Comment #4
mfer commentedDo you have a node produced in the feed without any files attached? That could cause the error.
Comment #5
chuckienorton commentedI have same error, and on my screen it repeats this error between 50 & 100 times... just keeps going down the screen.
I only have one node, and it does have an mp3 attached.
Any reason why it would do it?
thanks,
Chuck
Comment #6
joeburnham commentedI'm having the same issues (and I get the 50 some times repetition on the error), although I have a slightly different setup. My content type contains an embedded video, the body, and then an audio and video attachment, each with their own feed. When I submit, the embedded video works and the audio attachment shows up both on Drupal and in the feed. However, the video attachment doesn't show up anywhere. Thoughts?
FFPC - 6.x-0.7
Views - 6.x-2.3
CCK - 6.x-2.1
FileField - 6.x-3.0-alpha7
Comment #7
Rob_Feature commentedIt seems that no one is trying the dev version of ffpc. Please try that version since there were some things fixed in there. This may have been one of them. Report back with your results.
Comment #8
joeburnham commentedThe dev version fixed the errors that showed up. The other issues with my video feed were user setup errors (imagine that). All seems to be working fine now.
Comment #9
q0rban commentedI get a similar error when having a view that has more than just the audio's filefield field in it:
Attached is a patch that fixes it for me, although it will likely break if there are other non-audio filefield fields on the feed display.
Comment #10
pgdh commentedFFPC - 6.x-1.x-dev
Views - 6.x-2.6
CCK - 6.x-2.5
FileField - 6.x-3.1
Ok, so I started using Drupal for the first time 3 days ago. I'm on MacOS 10.6 and by yesterday I'd got as far as being able to upload and play MP3 files using the FileField method, but with errors due to Drupal 6 not jiving with PHP 5.3 (call me old fashioned, but it's just a dot release, isn't it?)
This morning I added 5.2.11 from Macports and all was fine and dandy until I tried out FFPC, which was how I got to this thread. I now understand what was wrong, and thought I'd share my experience.
I was following this recipe
http://drupal.org/node/313362
Then, after trawling this thread and a few others, in desparation I watched
http://mustardseedmedia.com/podcast/episode19
Rob makes a point of adding filters (namely Content file and Node published) whereas the recipe states "You can add anything else to filter your view as well such as content type, published, promoted, or any other filters you want...but they are not required"
All I know is that when I did this I stopped getting the warnings. I don't know whether this is a bug in the implementation or the recipe, but wanted to share my experience because I've already benefitted so much from everyone else's contributions.
Comment #11
lefnire commented-dev still has this problem, q0rban's #9 patch against dev fixes it. It's just because the foreach is looking through *all* fields rather than specifically filefields (should add some extra logic to make sure it's audio).
Comment #12
R.Hendel commentedHow do you think about making FFPC working with files in the cloud?
I think, this could be a solution for that problem, too.
Comment #13
traviscarden commentedThe "invalid argument for foreach" error here occurs when FFPC tries to loop through the filefields in the Views result and gets an empty set. This can occur, of course, if you haven't added an appropriate field to your View, but it can also happen if the result set is made up of nodes that don't have the field associated with them—for example, if you have a "Podcast" content type with a filefield on it, but your View returns all pages or blog posts. This is the importance of filters. Be sure to filter your view by content types that actually have the filefield field you added or you'll get this error (now or later later, if perchance your content is organized such that you don't see it yet). It might be helpful to amend the documentation to mention this. Theoretically you could test to see whether
$this->view->fieldis an array before trying to loop through it, but that doesn't address the deeper cause of the problem.Comment #14
q0rban commentedNot true for me. I was getting the problem b/c my view had more than just filefield fields, hence the patch in #9.
Comment #15
mfer commentedFYI, I'll be looking at and fixing this problem this week. Hoping #9 just does it. Stay tuned.
Comment #16
erifneerg commentedI just download the dev version and it doesn't seem to work for me. still getting the error as #9.
Comment #17
mfer commented@erifneerg of course you are still getting the problem. I have not fixed it, yet. Note, the status of the issue is not set to Fixed.
Comment #18
mfer commented#9 seems to work. Applied the fix.
http://drupal.org/cvs?commit=308294
Comment #19
erifneerg commented@mfer
ah, ok. I miss understood that other comment and the fact that there was a "nightly build" update. Works for me now! thanks
Comment #21
kbrune commentedI just (30 Apr 2010) installed the latest dev version. These are the warnings I get when I go to create new content (this is at /node/add, even before selecting a content type)...
Comment #22
tanma commented@ pgdh #10
Thanks! This simple solution fixed my problems when trying to create the feed view. I was getting loads of these warnings:
warning: Invalid argument supplied for foreach() in..../modules/ffpc/ffpc_plugin_row_podcast.inc on line 83.