Posted by armyofda12mnkeys on January 15, 2011 at 6:46am
2 followers
| Project: | Media Mover |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
I am just messing with 6.2-dev right now... and noticed the
'Save the file to' field no matter how many times I Save Configuration... when i got back, it just defaults at the first item (Drupal file attachment) vs the cck field i picked.
Comments
#1
What is the name of the action that you're using?
#2
So you can see my setup in the attached swf capture I took with Jing if you have Flash installed...
http://www.arianhojat.com/temp/mediamover_2011-01-15.swf
....
I upload files via IMCE to something like sites/default/storage/video/unconverted_video.
and then I process it via FFMPEG...
I create a new Store:Save to Node...
problem 1... the parameters for this step didn't show up until I hit save and went back...
When I go back, there is a foreach error "warning: Invalid argument supplied for foreach() in /home/...../includes/form.inc on line 1434."
I then click the name of the cck field of the new Node i want to create so hoping the newly converted FLV file gets saved to that filefield.
Problem2: I save and go back to Edit... and then the cck field isn't set, it defaults back to Drupal File Attachment.
I go there again and double check... You can see I check the mm config steps table and the value is stored correctly and the value is the same in the select name field... so not sure why its not selecting correct drop down there.
Thanks!,
Arian
#3
Note in the new dev release, the option for the cck field is saved so my main issue here i think is resolved...
I am not sure if it works, I will test that later...
The red form error still pops up though...
I just Add Step and next page doesn't have any of the config options as the video shows (just option to set Step Name)...
I then Save, and come back, and there is an error on page:
"warning: Invalid argument supplied for foreach() in /home/mysite/mysite.us/includes/form.inc on line 1434.". Not sure where this is right now, but something to look out for.
#4
What action are you adding as the next step that is giving you the warning?
#5
The 'Store: save to a node' action, is the step that brings the invalid foreach error.
I think everytime I was messing with this action, is where Ive gotten the foreach error. Disabling mm_node i think makes it go away, so somewhere in there maybe needs to get looked at... I can step through it later this weekend maybe.
#6
I'm not seeing any errors when I have that form element on either the add or edit. I'm running php5.3 as well. Can you post a screenshot?
#7
Yes, all the steps are in the swf movie I captured as well if you want to see me adding the step and then attached error ...
Here is a screenshot... Note after Clicking Add Next Step.... the 'Save to Node' Step doesn't have any fields to fill other than step name... but when you save and come back all the fields are there (different behavior than other mm sub-modules?. not sure if its on purpose or not)... Anyway you come back and the error is there. Note: I have enabled languages on my site and none show up in the 'Save node in language:' dropdown. Who knows, maybe that is causing the error.
#8
As per the form error on the foreach- this was due to the locale module which I did not have enabled. I just committed a fix for it.
As per the 'Store: save to a node' action- ok, this doesn't happen when you build a configuration from scratch but I'm totally unclear as to why it is happening here. Totally weird! Seems like there is an issue with the build for that particular action.....
#9
I just committed a fix for adding a new step to an existing configuration. This is a partial fix of "#8.
#10
Refactored my fix from #9 which fixes the issue with node save (and other) configurations. Basically the form was not loading the include files which included the configuration form. Once the form was rebuilt a second time, the full build data was on the step so it had the file path to load the mm_node.node.inc file
#11
Cool, i reinstalled module. and Noticed
* You can pick the cck fields easier (doesn't show every possibility like before).
* The 'Store: back to a CCK field' step errors, pic attached... Maybe it needs to follow same format as 'Select from CCK' step: aka...
$form['mm_node_content_field_store_config']['cck_field_save_node'] = array(
...
'#options' => mm_node_cck_fields(array('text', 'filefield', 'imagefield')),
);
//Not sure if thats correct but Added that just so I can select something
* also the Select Step can choose Multiple cck fields (multiple select field), but you can only store back on 1 (single drop down select field). Not sure if thats standard (but Im only interesting in selecting and storing to 1 field).
* Ran my config attached and got this error:
"Fatal error: Cannot use string offset as an array in sites/all/modules/filefield/filefield.module on line 351"
So FFMPEG converts the file, so maybe messes up in Step 3?, last 2 issues might be resolved by adding:
$form['mm_node_content_field_store_config']['cck_field_save_node'] = array(
.....
'#multiple' => TRUE,
However it still doesn't save the converted file in the node. :(
#12
The error with the field options is fixed
Yes this is intentional- you can only attach a file to one cck field. I guess it could be the case that somebody who wants this but I'm going to say no or now
This was an issue of passing the variables in reverse order. Should be ok now.
There was also a regression in the class_media_mover_step which should fix passing the file path.
I'm psyched that you're posting so many bug reports, thanks! When you're posting notes about code, can you either provide diffs or at least file names and line numbers? It makes it much easier for me to track down what issue you're experiencing.
#13
If thats the case, should the 'Select: from a CCK field' not be a #multiple select (just a single like the 'Store back to CCK' step).
Yep, I can do that.
I'll retest new release now.
EDIT:
So It looks like my config got done without error and associated the node with media mover file, but didn't actually save it in the cck field.
I'll take a double look at it tomorrow.
I think it may have tried to... The config errored until I changed the content type's cck field to accept .flv files.
EDIT#2: Think its working :). I just didnt select 'Replace existing file'. I'll see if I can get my slightly more complex configuration working.
#14
@armyofda12mnkeys can you post an update to if this is working for you now?