Harvest from/Save in CCK Filefield : Fatal Error

thoomyorke - August 23, 2009 - 18:36
Project:Media Mover
Version:5.x-1.0-rc7
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

Hi

I'm a newbie in Media_mover sphere, but thanks for the good work, this module seems amazing

However, I have a (kinda major) bug when trying to save a node :

Fatal error: Cannot use object of type stdClass as array in /sites/all/modules/filefield/filefield.module on line 163

FYI :
I am using
Drupal 5.16
MM 1.0-rc7
Filefield 2.4

Here is my MM config :

$configuration = new stdClass;
$configuration->required = array('mm_cck', 'mm_ffmpeg', 'mm_cck', 'media_mover_api');
$configuration->name = 'All videos to FLV';
$configuration->cid = '4';
$configuration->description = 'My configuration description';
$configuration->start_time = '0';
$configuration->last_start_time = '0';
$configuration->status = 'stopped';
$configuration->harvest->module = 'mm_cck';
$configuration->harvest->action = '1';
$configuration->harvest->configuration = array(
'mm_config_harvest_field' => array(
'field_video_original_report' => 'field_video_original_report'
),
'file_types' => 'avi mov wmv mpeg mp4 mpeg2 dv 3gp 3g2 mpeg4',
'cid' => '4',
'module' => 'mm_cck',
'action' => '1',
'verb' => 'harvest'
);
$configuration->harvest->cid = '4';
$configuration->process->module = 'mm_ffmpeg';
$configuration->process->action = '1';
$configuration->process->configuration = array(
'ffmpeg_output_type' => 'flv',
'ffmpeg_audio_advanced' => '1',
'ffmpeg_audio_ab' => '64k',
'ffmpeg_audio_ar' => '22050',
'ffmpeg_audio_acodec' => 'libmp3lame',
'ffmpeg_video_advanced' => '1',
'ffmpeg_video_size' => '0',
'ffmpeg_video_size_other' => '',
'ffmpeg_video_fps' => '25',
'ffmpeg_video_br' => '500k',
'ffmpeg_video_vcodec' => 'flv',
'ffmpeg_time_advanced' => '0',
'ffmpeg_time' => '30',
'ffmpeg_video_custom' => '0',
'ffmpeg_video_custom_command' => '-i %in_file %out_file',
'ffmpeg_output_perms' => '0644',
'cid' => '4',
'module' => 'mm_ffmpeg',
'action' => '1',
'verb' => 'process'
);
$configuration->process->cid = '4';
$configuration->storage->module = 'mm_cck';
$configuration->storage->action = '2';
$configuration->storage->configuration = array(
'mm_cck_field_save_2' => 'field_video_flv',
'cid' => '4',
'module' => 'mm_cck',
'action' => '2',
'verb' => 'storage'
);
$configuration->storage->cid = '4';
$configuration->complete->module = 'media_mover_api';
$configuration->complete->action = '1';
$configuration->complete->configuration = array(
'cid' => '4',
'module' => 'media_mover_api',
'action' => '1',
'verb' => 'complete'
);
$configuration->complete->cid = '4';
$configuration->hierarchy->parent = '0';

#1

arthurf - September 15, 2009 - 05:14

Hi- thanks for your kind words!

So it looks like what is happening is that I'm passing filefield an object instead of an array (what it is expecting). If you can try changing line 411 in mm_cck to read something like: return (array) $file; that error may go away. If so then I need do to do a quick rewrite of that so that it works as expected.

 
 

Drupal is a registered trademark of Dries Buytaert.