Along the lines of this feature request (http://drupal.org/node/12415), I would like to see support for node types extended by other modules. Specifically, flexinodes and events. These are staples of the Drupal system and node_import would be much more useful if it included support for these other nodes.

Comments

drumm’s picture

Marked http://drupal.org/node/12415 as a duplicate of this issue.

alanburke’s picture

Version: 4.5.x-1.x-dev » master

Updating this request to such that it should apply to 4.7

It doesn't import event node types at the moment.

I hope not treading on any toes..

Regards
Alan

dado’s picture

alan,
no toes here.
i am importing event-enabled (using event module) CCK nodes no problem. what kind of event node are you trying to import?
thanks
dado

alanburke’s picture

I had to think about this ...
As far As I can tell, I didn't create a new Content Type.
I just use the event node type that came 'bundled' with the event module.

It doesn't show up as a node type I can import.
Maybe I could use the story type.

Alan

[As a side note, The file I was using for testing this is a file generated by the import/export module on a seperate Drupal 4.6 site, and having looked closer, that file wouldn't be suitable for import with this module anyway].

dado’s picture

Alan,
Yes, there is no node_import script for the basicevent node type. Your choices are

(1) use story or flexinode or cck to make a node type and event-enable it
(2) write code to permit basicevent to be importable. Should be real easy. This is all the code to make the story nodes importable:

function story_node_import_types() {
  return array('story' => t('Story'));
}

function story_node_import_fields($type) {
  if ($type == 'story') {
    return array('title' => t('Title'), 'body' => t('Body'));
  }
}

For the basicevent, you might be able to just replace every instance of "story" above with "basicevent". Be sure to include any new file you write ("import_basicevent.inc"?) in node_import.module like so

if (module_exist('basicevent')) {
  include_once('import_basicevent.inc');
}
Robrecht Jacques’s picture

Status: Active » Fixed

Fixed in CVS. There is now a supported/basicevent.inc.

Anonymous’s picture

Status: Fixed » Closed (fixed)