I'm experiencing the following with 5.x-5.4
The error below happens the first time I upload the file, and it shows no file associated with the flashnode when I edit. In my case, the file isn't actually uploaded.
* The selected file could not be copied, because no file by that name exists. Please check that you supplied the correct filename.
* warning: Invalid argument supplied for foreach() in /www/drupal/sites/all/modules/flashnode/flashnode.module on line 414.
* warning: Invalid argument supplied for foreach() in /www/drupal/sites/all/modules/flashnode/flashnode.module on line 414.
* warning: Invalid argument supplied for foreach() in /www/drupal/sites/all/modules/flashnode/flashnode.module on line 414.
* warning: Invalid argument supplied for foreach() in /www/drupal/sites/all/modules/flashnode/flashnode.module on line 414.
If you revisit the page, you get the following 8 times.
* warning: Invalid argument supplied for foreach() in /www/drupal/sites/all/modules/flashnode/flashnode.module on line 414.
The second time I upload a file on the same node, it is transferred to the server and the page works.
Note: This appears to be an interaction between Workflow and flashmodule, since flashnode uploads as expected when no workflow is applied to it.
Comments
Comment #1
Stuart Greenfield commentedWhich version of workflow are you using? I've never used it before, but I just installed a copy of 5.x-2.2 on my test system running flash node 5.x-5.4 and it seems to work ok. I can create a workflow, and assign it to flash nodes, and everything is fine here!
Comment #2
eliza411 commentedI apologize for not posting version information. The site is using workflow 5.x-2.2 and drupal 5.7. It will be a few more days until I can return my attention to troubleshooting this, but perhaps its one of the actions that workflow is performing. I'll post more information when I can be more thorough troubleshooting.
And mysql Ver 14.12 Distrib 5.0.45, for redhat-linux-gnu (x86_64) using readline 5.0
Comment #3
pickoffwhite commentedI'm getting this same error and I do not use workflow at all.
warning: Invalid argument supplied for foreach() in /home/17102/domains/centerforinvestigativereporting.org/html/modules/flashnode/flashnode.module on line 414.
I also ran update.php to make sure everything that is supposed to be there, is there.
I'm using flash node 5.x - 5.4 without swftools installed (I have a multilevel flash project that would not call my external swfs with swftools) . You can see the project here:
http://centerforinvestigativereporting.org/node/3727
On a separate note, my swfs are not calling up my flvs which I'm currently working on. The flash file works properly when you just view it as a swf.
http://centerforinvestigativereporting.org/files/flash/chauncey.swf
I have no idea if this error is tied to my viewing issues or not. But it's certainly filling up my error logs.
Comment #4
Stuart Greenfield commentedwarning: Invalid argument supplied for foreach() in /home/17102/domains/centerforinvestigativereporting.org/html/modules/flashnode/flashnode.module on line 414.usually occurs if the {flashnode} table didn't get updated properly, so when the node tries to load the flash settings it doesn't find anything to do.There have now been several reports of this bug, although I've never seen it "in anger", only during development, and then usually because I am directly working with the tables as I experiment with stuff :-)
I think I might try to write a short admin/audit function - that way I might be able to let you "diagnose" the error, and I can start to get some feedback as to what might be causing this.
I know it sounds like a typical help desk solution, but try deleting the offending node and recreating it, or try re-attaching the flash file. That might fix the table, and therefore the error!
Comment #5
pickoffwhite commentedThanks!
That took care of the error, but now none of my swfs are being called up.
Comment #6
johnvsc commentedHello,
Was there a solution for this error?
It seems as if there were several things that were not doing things as they should: 1) on install, the db tables only had vid in it. (From Stuart's post I manually added the rest) 2) Is there an issue with a more strict MySQL grammar than in previous? I am running MySQL 5
3) The items for the db never get there: The first time i looked into content_type_flashnode there were no rows.... even though I added severl flashnodes 4) even when I manually added what should have been there, I got the "warning: Invalid argument supplied for foreach() on line 414" error.
Also, I am only using FlashNode with SWFTools.
Any thoughts?
Comment #7
johnvsc commentedi would just like to post that my errors with the Flash Node ceased when I moved to d6
everything works.... and i don't even use the SWF Object module
great job... this is so easy and perfect!
Really, thanks!
Comment #8
Stuart Greenfield commentedHmmm, so it didn't work under D5, and it's fine under D6!
I will compare the flash node code to see if there is something different between the two... There are some minor changes but it's basically the same so I'm not sure why it didn't work before, and why it does now!
Out of interest, are you running with Postgres or MySQL? It's the only thing I haven't investigated so far, but I know that under D6 the database abstraction was enhanced to improve compatability.
I guess the good news is that it's working for you under D6 - hopefully flash node will now do what you need!
Comment #9
daniel-san commentedI was about to submit a bug report regarding this same issue. I am running Drupal 5.10 with MySQL as well.
I am receiving the same error on upload of a flv.
* warning: Invalid argument supplied for foreach() in /www/mysite/sites/all/modules/flashnode/flashnode.module on line 414.
Looking at those lines, they seem to be dealing with the size parameters. I tried both using height and width and leaving out height and width and got the same result. As well, when entering height and width on creating the node, it does not save those settings.
I may move to Drupal 6, but I'm waiting for SWFTools to be ready because I'm using it for flash video files.