Hi,

I'm getting this error when I try to post an image via email.

Fatal error: Cannot use object of type stdClass as array in /[path]/sites/all/modules/media_mover/mm_node/mm_node.module on line 310

I'm using RC1 on drupal 5.10, and the files are getting into the system, but when I run the configuration, it coughs up this error. The MM config is set to harvest files from email, create a new node, and upload the file into a cck field. It seems to hang on the node creation part. I have it set to post to a node type called "photo", but I tried it with story as well.

It seemed to be successful posting blog posts, but that was when I still had the node type set to photo.

Hope that helps, let me know if there's other info that would be useful.

Here's the export of the configuration:

$configuration->harvest->module = 'media_mover_email';
$configuration->harvest->action = '1';
$configuration->harvest->configuration = array(
    'media_mover_email_formats' => 'jpeg, jpg, gif, png',
    'mail' => 'foo@bar.ca',
    'folder' => 'INBOX',
    'imap' => '0',
    'domain' => 'mail.mediacoop.ca',
    'port' => '110',
    'name' => 'foo@bar.ca',
    'pass' => '***',
    'extraimap' => '/notls/novalidate-cert',
    'mime' => 'TEXT/HTML,TEXT/PLAIN',
    'replies' => '1',
    'commands' => '',
    'sigseparator' => '',
    'delete_after_read' => '0',
    'cid' => '4',
    'module' => 'media_mover_email',
    'action' => '1',
    'verb' => 'harvest',
 );
$configuration->process->module = 'media_mover_api';
$configuration->process->action = '1';
$configuration->process->configuration = array(
    'cid' => '4',
    'module' => 'media_mover_api',
    'action' => '1',
    'verb' => 'process',
 );
$configuration->storage->module = 'mm_node';
$configuration->storage->action = '4';
$configuration->storage->configuration = array(
    'node_save_type' => 'story',
    'node_save_files' => '0',
    'node_save_language' => 'en',
    'node_save_override' => '0',
    'node_save_name' => 'Emailer',
    'node_title_default' => '',
    'cid' => '4',
    'module' => 'mm_node',
    'action' => '4',
    'verb' => 'storage',
 );
$configuration->complete->module = 'mm_cck';
$configuration->complete->action = '3';
$configuration->complete->configuration = array(
    'mm_cck_field_save_3' => 'field_image',
    'cid' => '4',
    'module' => 'mm_cck',
    'action' => '3',
    'verb' => 'complete',
 );
$configuration->required = array('media_mover_email','media_mover_api','mm_node','mm_cck');
$configuration->name = 'Receive-emailed-photos';
$configuration->description = 'Make nodes from emails to foo@bar.ca';
$configuration->start_time = '1231025263';
$configuration->last_start_time = '1231024778';
$configuration->status = 'stopped';
$configuration->settings = '';
$configuration->hierarchy->parent = '0';

Comments

arthurf’s picture

Status: Active » Postponed (maintainer needs more info)

Thanks fore the really good bug report- makes my life a bit easier!

This was an issue of data structure change between versions. I've cleaned things up and I think it should work for you now- please check out the CVS version and let me know how it goes.

druojajay’s picture

Hi,

I installed the update, but a bunch of things seem to have stopped working. I'm now getting stuck at the Storage stage.

And now, it seems to have switched over to giving me this error every time I run the config.

Fatal error: Call to undefined function file_get_mimetype() in /var/alternc/html/f/ftm/drupal_mediacoop/sites/all/modules/media_mover/mm_node/mm_node.module on line 412

When I go back and look at the file status, it says it is storing. Always storing.

It is creating nodes, but they are entirely blank. No titles. The body says "This was uploaded without any additional information". Doesn't seem to matter what node type I set it to.

In other news, the mail import function went nuts and imported the same email 322 times. It might not be remembering which emails it downloaded, or discerning properly between read and unread messages. (Sorry, can't figure out if this happened before or after I updated to the last Dev release.)

I recreated the config from scratch after I updated. This is what I'm using now:

$configuration->harvest->module = 'media_mover_email';
$configuration->harvest->action = '1';
$configuration->harvest->configuration = array(
    'media_mover_email_formats' => 'jpeg, jpg, gif, png',
    'mail' => 'inbox@foo.bar',
    'folder' => 'INBOX',
    'imap' => '0',
    'domain' => 'mail.foo.bar',
    'port' => '110',
    'name' => 'inbox@foo.bar',
    'pass' => 'xxx',
    'extraimap' => '/notls/novalidate-cert',
    'mime' => 'TEXT/HTML,TEXT/PLAIN',
    'replies' => '',
    'commands' => '',
    'sigseparator' => '',
    'delete_after_read' => '1',
    'cid' => '5',
    'module' => 'media_mover_email',
    'action' => '1',
    'verb' => 'harvest',
 );
$configuration->process->module = 'media_mover_api';
$configuration->process->action = '1';
$configuration->process->configuration = array(
    'cid' => '5',
    'module' => 'media_mover_api',
    'action' => '1',
    'verb' => 'process',
 );
$configuration->storage->module = 'mm_node';
$configuration->storage->action = '4';
$configuration->storage->configuration = array(
    'node_save_type' => 'blog',
    'node_save_files' => '1',
    'node_save_language' => 'en',
    'node_save_override' => '0',
    'node_save_name' => 'Emailer',
    'node_title_default' => '',
    'cid' => '5',
    'module' => 'mm_node',
    'action' => '4',
    'verb' => 'storage',
 );
$configuration->complete->module = 'mm_cck';
$configuration->complete->action = '3';
$configuration->complete->configuration = array(
    'mm_cck_field_save_3' => 'field_image',
    'cid' => '5',
    'module' => 'mm_cck',
    'action' => '3',
    'verb' => 'complete',
 );
$configuration->required = array('media_mover_email','media_mover_api','mm_node','mm_cck');
$configuration->name = 'Import Images from Email';
$configuration->description = 'Grab images from inbox@foo.bar';
$configuration->start_time = '1231312633';
$configuration->last_start_time = '1231312526';
$configuration->status = 'stopped';
$configuration->settings->mma_file_perm = 0;
$configuration->settings->mma_file_mask = '0644';
$configuration->settings->mma_node_edit_item_show = 0;
$configuration->settings->mma_node_item_delete = 1;
$configuration->settings->mma_node_config_rss = 0;
$configuration->settings->mma_cron_notify = 0;
$configuration->settings->mma_cron_notify_email = '';
$configuration->settings->mma_cron_notify_time = '10';
$configuration->settings->mma_process_num = '0';
$configuration->settings->mma_storage_num = '0';
$configuration->settings->mma_complete_num = '0';
$configuration->hierarchy->parent = '0';

Hope that helps! Thanks for the speedy response.

d