warning: Invalid argument for foreach() in /ffpc/ffpc_plugin_row_podcast
lil - November 11, 2008 - 16:27
| Project: | FileField Podcaster |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | reviewed & tested by the community |
Description
warning: Invalid argument supplied for foreach() in /home/mysite/modules/ffpc/ffpc_plugin_row_podcast.inc on line 86.
Hi,
This is the warning I have through the pages and the file (I upload mp3) doesn't show up in the feed, only the node title and the body.
I am using the right versions of the modules needed, the access permissions are set OK and I have not added the extra fields to the view (the other views with the same nodes work fine). Could somebody please help, thanks!

#1
Are 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
#2
I 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
#3
I 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.
#4
Do you have a node produced in the feed without any files attached? That could cause the error.
#5
I 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
#6
I'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
#7
It 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.
#8
The 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.
#9
I 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.
#10
FFPC - 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.
#11
-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).