Closed (duplicate)
Project:
Mailhandler
Version:
6.x-2.4
Component:
Mailhandler
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Feb 2012 at 08:31 UTC
Updated:
19 Jun 2012 at 19:05 UTC
I got mailhandler to create nodes with taxonomy terms. However, the problem is that it's not create forum topics correctly. Below you will see the export of my Feed Importer. To test, I sent an email and did the import. The forum node got created with the correct Taxonomy but it doesn't show up on the forum because it didn't create an entry in the drupal's forum table. If I edit the node and save it then it add an entry to the table and the forum topic shows up. I tried with the latest release version and the dev version and neither worked. Any suggestions? Thank you
-Andre
$feeds_importer = new stdClass;
$feeds_importer->disabled = FALSE; /* Edit this to true to make a default feeds_importer disabled initially */
$feeds_importer->api_version = 1;
$feeds_importer->id = 'mailhandler_nodes';
$feeds_importer->config = array(
'name' => 'Forum',
'description' => '',
'fetcher' => array(
'plugin_key' => 'MailhandlerFetcher',
'config' => array(
'filter' => 'MailhandlerFiltersNodes',
),
),
'parser' => array(
'plugin_key' => 'MailhandlerParser',
'config' => array(
'default_commands' => 'status: 0
taxonomy: [Main]
type: forum
tid: 1',
'commands_failed_auth' => 'status: 0
taxonomy: [Main]
type: forum
tid: 1',
'available_commands' => 'status
taxonomy
type
tid',
'command_plugin' => array(
'MailhandlerCommandsHeaders' => 'MailhandlerCommandsHeaders',
'MailhandlerCommandsDefault' => 'MailhandlerCommandsDefault',
'MailhandlerCommandsFiles' => 'MailhandlerCommandsFiles',
),
'authenticate_plugin' => 'MailhandlerAuthenticateDefault',
),
),
'processor' => array(
'plugin_key' => 'FeedsNodeProcessor',
'config' => array(
'content_type' => 'forum',
'input_format' => '4',
'update_existing' => '0',
'expire' => '-1',
'mappings' => array(
0 => array(
'source' => 'subject',
'target' => 'title',
'unique' => FALSE,
),
1 => array(
'source' => 'body_text',
'target' => 'body',
'unique' => FALSE,
),
2 => array(
'source' => 'authenticated_uid',
'target' => 'uid',
'unique' => FALSE,
),
3 => array(
'source' => 'status',
'target' => 'status',
'unique' => FALSE,
),
4 => array(
'source' => 'taxonomy',
'target' => 'taxonomy:1',
'unique' => FALSE,
),
),
'author' => 0,
'authorize' => 1,
),
),
'content_type' => '',
'update' => 0,
'import_period' => '900',
'expire_period' => 3600,
'import_on_create' => 1,
);
Comments
Comment #0.0
asilva1312 commentedformatted for code.
Comment #1
asilva1312 commentedAny thoughts anyone?
Comment #2
asilva1312 commentedbumpComment #3
asilva1312 commentedSince there was no immediate solution, I wrote a quick custom module as a work around. Here is the code. Hope it helps someone.
custom.module file
custom.info file
You can place the above 2 files in a folder called custom and upload it into your module folder and activate it.
Comment #4
danepowell commentedNo need to bump, I saw this issue when you first posted it- I'm just extraordinarily busy with other projects at the moment and don't have the bandwidth to handle this issue. I'll get around to it when I can.
Comment #5
danepowell commentedThis is really a more general problem with Feeds, which Mailhandler relies upon. Please see #818812: Assign feed items to a specific forum.
As you discovered, you will need to write a custom module to solve this, or re-open that issue in the Feeds queue. If writing a separate module, I would recommend using hooks provided by the Feeds module to act after the node processor runs, rather than using hook_nodeapi().
Comment #6
danepowell commentedMarking as a dupe of #818812: Assign feed items to a specific forum
Comment #6.0
danepowell commentedformatted for php