Can this module import a content type that has been exported on from drupal 6? I tried, but received the following error message "The pasted text did not contain any valid export data."

Comments

dinis’s picture

The format of the import / export script is significantly different from the Drupal 6 module.

I've achieved a transfer from D6 but it required manual alteration of the Drupal 6 export script, which took nearly as much time as if I had just started from scratch in D7.

swentel’s picture

Status: Active » Closed (won't fix)

Hmm, no that won't work without manual changes to a D6 content copy export as Dinis says in #1.

dfrishberg’s picture

I actually have this problem importing to and from D7 (same modules installed, these are two copies of the same installation on a dev and a production server. The only difference is different content, content types, views, and image configurations).

Export generated (a warning was triggered: Notice: Undefined variable: output in ctools_var_export() (line 837 of /home/dfrishberg/public_projects/next2012/sites/all/modules/ctools/includes/export.inc).):

$data = array(
  'bundles' => array(
    'faculty_quote' => (object) array(
      'type' => 'faculty_quote',
      'name' => 'Faculty Quote',
      'base' => 'node_content',
      'module' => 'node',
      'description' => 'Used in Faculty Roundtable.',
      'help' => '',
      'has_title' => '1',
      'title_label' => 'Title',
      'custom' => '1',
      'modified' => '1',
      'locked' => '0',
      'disabled' => '0',
      'orig_type' => 'faculty_quote',
      'disabled_changed' => FALSE,
      'bc_entity_type' => 'node',
    ),
  ),
  'fields' => array(
    'body' => array(
      'entity_types' => array(
        0 => 'node',
      ),
      'translatable' => '0',
      'settings' => array(),
      'storage' => array(
        'type' => 'field_sql_storage',
        'settings' => array(),
        'module' => 'field_sql_storage',
        'active' => '1',
        'details' => array(
          'sql' => array(
            'FIELD_LOAD_CURRENT' => array(
              'field_data_body' => array(
                'value' => 'body_value',
                'summary' => 'body_summary',
                'format' => 'body_format',
              ),
            ),
            'FIELD_LOAD_REVISION' => array(
              'field_revision_body' => array(
                'value' => 'body_value',
                'summary' => 'body_summary',
                'format' => 'body_format',
              ),
            ),
          ),
        ),
      ),
      'foreign keys' => array(
        'format' => array(
          'table' => 'filter_format',
          'columns' => array(
            'format' => 'format',
          ),
        ),
      ),
      'indexes' => array(
        'format' => array(
          0 => 'format',
        ),
      ),
      'id' => '2',
      'global_block_settings' => '2',
      'field_name' => 'body',
      'type' => 'text_with_summary',
      'module' => 'text',
      'active' => '1',
      'locked' => '0',
      'cardinality' => '-1',
      'deleted' => '0',
      'columns' => array(
        'value' => array(
          'type' => 'text',
          'size' => 'big',
          'not null' => FALSE,
        ),
        'summary' => array(
          'type' => 'text',
          'size' => 'big',
          'not null' => FALSE,
        ),
        'format' => array(
          'type' => 'varchar',
          'length' => 255,
          'not null' => FALSE,
        ),
      ),
      'bundles' => array(
        'node' => array(
          0 => 'page',
          1 => 'article',
          2 => 'student_profile',
          3 => 'student_work',
          4 => 'event',
          5 => 'faculty_quote',
        ),
      ),
    ),
    'field_faculty_quote_bio_url' => array(
      'translatable' => '0',
      'entity_types' => array(),
      'settings' => array(
        'attributes' => array(
          'target' => 'default',
          'class' => '',
          'rel' => '',
        ),
        'url' => 0,
        'title' => 'optional',
        'title_value' => '',
        'title_maxlength' => 128,
        'enable_tokens' => 1,
        'display' => array(
          'url_cutoff' => 80,
        ),
      ),
      'storage' => array(
        'type' => 'field_sql_storage',
        'settings' => array(),
        'module' => 'field_sql_storage',
        'active' => '1',
        'details' => array(
          'sql' => array(
            'FIELD_LOAD_CURRENT' => array(
              'field_data_field_faculty_quote_bio_url' => array(
                'url' => 'field_faculty_quote_bio_url_url',
                'title' => 'field_faculty_quote_bio_url_title',
                'attributes' => 'field_faculty_quote_bio_url_attributes',
              ),
            ),
            'FIELD_LOAD_REVISION' => array(
              'field_revision_field_faculty_quote_bio_url' => array(
                'url' => 'field_faculty_quote_bio_url_url',
                'title' => 'field_faculty_quote_bio_url_title',
                'attributes' => 'field_faculty_quote_bio_url_attributes',
              ),
            ),
          ),
        ),
      ),
      'foreign keys' => array(),
      'indexes' => array(),
      'id' => '18',
      'global_block_settings' => '1',
      'field_name' => 'field_faculty_quote_bio_url',
      'type' => 'link_field',
      'module' => 'link',
      'active' => '1',
      'locked' => '0',
      'cardinality' => '1',
      'deleted' => '0',
      'columns' => array(
        'url' => array(
          'type' => 'varchar',
          'length' => 2048,
          'not null' => FALSE,
          'sortable' => TRUE,
        ),
        'title' => array(
          'type' => 'varchar',
          'length' => 255,
          'not null' => FALSE,
          'sortable' => TRUE,
        ),
        'attributes' => array(
          'type' => 'text',
          'size' => 'medium',
          'not null' => FALSE,
        ),
      ),
      'bundles' => array(
        'node' => array(
          0 => 'faculty_quote',
        ),
      ),
    ),
    'field_faculty_quote_headshot' => array(
      'translatable' => '0',
      'entity_types' => array(),
      'settings' => array(
        'uri_scheme' => 'public',
        'default_image' => 0,
      ),
      'storage' => array(
        'type' => 'field_sql_storage',
        'settings' => array(),
        'module' => 'field_sql_storage',
        'active' => '1',
        'details' => array(
          'sql' => array(
            'FIELD_LOAD_CURRENT' => array(
              'field_data_field_faculty_quote_headshot' => array(
                'fid' => 'field_faculty_quote_headshot_fid',
                'alt' => 'field_faculty_quote_headshot_alt',
                'title' => 'field_faculty_quote_headshot_title',
                'width' => 'field_faculty_quote_headshot_width',
                'height' => 'field_faculty_quote_headshot_height',
              ),
            ),
            'FIELD_LOAD_REVISION' => array(
              'field_revision_field_faculty_quote_headshot' => array(
                'fid' => 'field_faculty_quote_headshot_fid',
                'alt' => 'field_faculty_quote_headshot_alt',
                'title' => 'field_faculty_quote_headshot_title',
                'width' => 'field_faculty_quote_headshot_width',
                'height' => 'field_faculty_quote_headshot_height',
              ),
            ),
          ),
        ),
      ),
      'foreign keys' => array(
        'fid' => array(
          'table' => 'file_managed',
          'columns' => array(
            'fid' => 'fid',
          ),
        ),
      ),
      'indexes' => array(
        'fid' => array(
          0 => 'fid',
        ),
      ),
      'id' => '17',
      'global_block_settings' => '1',
      'field_name' => 'field_faculty_quote_headshot',
      'type' => 'image',
      'module' => 'image',
      'active' => '1',
      'locked' => '0',
      'cardinality' => '1',
      'deleted' => '0',
      'columns' => array(
        'fid' => array(
          'description' => 'The {file_managed}.fid being referenced in this field.',
          'type' => 'int',
          'not null' => FALSE,
          'unsigned' => TRUE,
        ),
        'alt' => array(
          'description' => 'Alternative image text, for the image\'s \'alt\' attribute.',
          'type' => 'varchar',
          'length' => 128,
          'not null' => FALSE,
        ),
        'title' => array(
          'description' => 'Image title text, for the image\'s \'title\' attribute.',
          'type' => 'varchar',
          'length' => 128,
          'not null' => FALSE,
        ),
        'width' => array(
          'description' => 'The width of the image in pixels.',
          'type' => 'int',
          'unsigned' => TRUE,
        ),
        'height' => array(
          'description' => 'The height of the image in pixels.',
          'type' => 'int',
          'unsigned' => TRUE,
        ),
      ),
      'bundles' => array(
        'node' => array(
          0 => 'faculty_quote',
        ),
      ),
    ),
    'field_faculty_quote_name' => array(
      'translatable' => '0',
      'entity_types' => array(),
      'settings' => array(
        'max_length' => '255',
      ),
      'storage' => array(
        'type' => 'field_sql_storage',
        'settings' => array(),
        'module' => 'field_sql_storage',
        'active' => '1',
        'details' => array(
          'sql' => array(
            'FIELD_LOAD_CURRENT' => array(
              'field_data_field_faculty_quote_name' => array(
                'value' => 'field_faculty_quote_name_value',
                'format' => 'field_faculty_quote_name_format',
              ),
            ),
            'FIELD_LOAD_REVISION' => array(
              'field_revision_field_faculty_quote_name' => array(
                'value' => 'field_faculty_quote_name_value',
                'format' => 'field_faculty_quote_name_format',
              ),
            ),
          ),
        ),
      ),
      'foreign keys' => array(
        'format' => array(
          'table' => 'filter_format',
          'columns' => array(
            'format' => 'format',
          ),
        ),
      ),
      'indexes' => array(
        'format' => array(
          0 => 'format',
        ),
      ),
      'id' => '16',
      'global_block_settings' => '1',
      'field_name' => 'field_faculty_quote_name',
      'type' => 'text',
      'module' => 'text',
      'active' => '1',
      'locked' => '0',
      'cardinality' => '1',
      'deleted' => '0',
      'columns' => array(
        'value' => array(
          'type' => 'varchar',
          'length' => '255',
          'not null' => FALSE,
        ),
        'format' => array(
          'type' => 'varchar',
          'length' => 255,
          'not null' => FALSE,
        ),
      ),
      'bundles' => array(
        'node' => array(
          0 => 'faculty_quote',
        ),
      ),
    ),
  ),
  'instances' => array(
    'body' => array(
      0 => array(
        'label' => 'Body',
        'widget' => array(
          'type' => 'text_textarea_with_summary',
          'settings' => array(
            'rows' => 20,
            'summary_rows' => 5,
          ),
          'weight' => '31',
          'module' => 'text',
        ),
        'settings' => array(
          'display_summary' => TRUE,
          'text_processing' => 1,
          'user_register_form' => FALSE,
        ),
        'display' => array(
          'default' => array(
            'label' => 'hidden',
            'type' => 'text_default',
            'settings' => array(),
            'module' => 'text',
            'weight' => 0,
          ),
          'teaser' => array(
            'label' => 'hidden',
            'type' => 'text_summary_or_trimmed',
            'settings' => array(
              'trim_length' => 600,
            ),
            'module' => 'text',
            'weight' => 0,
          ),
          'cck_blocks' => array(
            'type' => 'hidden',
            'label' => 'above',
            'settings' => array(),
            'weight' => 0,
          ),
        ),
        'required' => FALSE,
        'description' => '',
        'id' => '25',
        'field_id' => '2',
        'field_name' => 'body',
        'entity_type' => 'node',
        'bundle' => 'faculty_quote',
        'deleted' => '0',
        'default_value' => NULL,
      ),
    ),
    'field_faculty_quote_bio_url' => array(
      0 => array(
        'label' => 'Faculty Bio URL',
        'widget' => array(
          'weight' => '34',
          'type' => 'link_field',
          'module' => 'link',
          'active' => 0,
          'settings' => array(),
        ),
        'settings' => array(
          'validate_url' => 1,
          'url' => 0,
          'title' => 'none',
          'title_value' => '',
          'title_maxlength' => '128',
          'enable_tokens' => 0,
          'display' => array(
            'url_cutoff' => '80',
          ),
          'attributes' => array(
            'target' => '_blank',
            'rel' => '',
            'class' => '',
            'configurable_title' => 0,
            'title' => '',
          ),
          'user_register_form' => FALSE,
        ),
        'display' => array(
          'default' => array(
            'label' => 'above',
            'type' => 'link_default',
            'settings' => array(),
            'module' => 'link',
            'weight' => 3,
          ),
          'teaser' => array(
            'type' => 'hidden',
            'label' => 'above',
            'settings' => array(),
            'weight' => 0,
          ),
          'cck_blocks' => array(
            'type' => 'hidden',
            'label' => 'above',
            'settings' => array(),
            'weight' => 0,
          ),
        ),
        'required' => 0,
        'description' => '',
        'default_value' => NULL,
        'id' => '28',
        'field_id' => '18',
        'field_name' => 'field_faculty_quote_bio_url',
        'entity_type' => 'node',
        'bundle' => 'faculty_quote',
        'deleted' => '0',
      ),
    ),
    'field_faculty_quote_headshot' => array(
      0 => array(
        'label' => 'Faculty Headshot',
        'widget' => array(
          'weight' => '33',
          'type' => 'image_image',
          'module' => 'image',
          'active' => 1,
          'settings' => array(
            'progress_indicator' => 'throbber',
            'preview_image_style' => 'thumbnail',
          ),
        ),
        'settings' => array(
          'file_directory' => 'sites/default/files/images/headshots/faculty',
          'file_extensions' => 'png gif jpg jpeg',
          'max_filesize' => '1 MB',
          'max_resolution' => '',
          'min_resolution' => '140x100',
          'alt_field' => 0,
          'title_field' => 0,
          'user_register_form' => FALSE,
        ),
        'display' => array(
          'default' => array(
            'label' => 'above',
            'type' => 'image',
            'settings' => array(
              'image_style' => '',
              'image_link' => '',
            ),
            'module' => 'image',
            'weight' => 2,
          ),
          'teaser' => array(
            'type' => 'hidden',
            'label' => 'above',
            'settings' => array(),
            'weight' => 0,
          ),
          'cck_blocks' => array(
            'type' => 'hidden',
            'label' => 'above',
            'settings' => array(),
            'weight' => 0,
          ),
        ),
        'required' => 0,
        'description' => '',
        'id' => '27',
        'field_id' => '17',
        'field_name' => 'field_faculty_quote_headshot',
        'entity_type' => 'node',
        'bundle' => 'faculty_quote',
        'deleted' => '0',
      ),
    ),
    'field_faculty_quote_name' => array(
      0 => array(
        'label' => 'Faculty Name',
        'widget' => array(
          'weight' => '32',
          'type' => 'text_textfield',
          'module' => 'text',
          'active' => 1,
          'settings' => array(
            'size' => '255',
          ),
        ),
        'settings' => array(
          'text_processing' => '0',
          'user_register_form' => FALSE,
        ),
        'display' => array(
          'default' => array(
            'label' => 'above',
            'type' => 'text_default',
            'settings' => array(),
            'module' => 'text',
            'weight' => 1,
          ),
          'teaser' => array(
            'type' => 'hidden',
            'label' => 'above',
            'settings' => array(),
            'weight' => 0,
          ),
          'cck_blocks' => array(
            'type' => 'hidden',
            'label' => 'above',
            'settings' => array(),
            'weight' => 0,
          ),
        ),
        'required' => 1,
        'description' => '',
        'default_value' => NULL,
        'id' => '26',
        'field_id' => '16',
        'field_name' => 'field_faculty_quote_name',
        'entity_type' => 'node',
        'bundle' => 'faculty_quote',
        'deleted' => '0',
      ),
    ),
  ),
);

Attempt to import on the other server generated the message: The pasted text did not contain any valid export data.

amcoms’s picture

I guess this is a non starter then?? Why upgrade / update without a clear steer in migrating content. What do developers think is being added to the CMS if not data that needs to be migrated!! Utter nonesense and the guys and gals coding are supposed to be smart, duhhhhh :)

RichaDaffodil’s picture

Please read the #1 comment as written above.you have to do some manual alteration of the script.

summit’s picture

Issue summary: View changes

Hi,
What are the manual alterations for this please?
Greetings, Martijn

RichaDaffodil’s picture

Hi Summit,

As per mention #1 The format of the import / export script is significantly different from the Drupal 6 module. The drupal 6 export script is not according drupal 7. I have checked and found, in drupal 6 script is store in the $content but in drupal 7 export script is store in the $data so we need to replace the $content to $data. For this we need to require no. of changes for converting drupal 6 export script to drupal 7 export script.

Drupal 6 export script (Sample)

$content['type']  = array (
  'name' => 'test11',
  'type' => 'test11',
  'description' => '',
  'title_label' => 'Title',
  'body_label' => 'Body',
  'min_word_count' => '0',
  'help' => '',
  'node_options' => 
  array (
    'status' => true,
    'promote' => true,
    'sticky' => false,
    'revision' => false,
  ),
  'old_type' => 'test11',
  'orig_type' => '',
  'module' => 'node',
  'custom' => '1',
  'modified' => '1',
  'locked' => '0',
  'comment' => '2',
  'comment_default_mode' => '4',
  'comment_default_order' => '1',
  'comment_default_per_page' => '50',
  'comment_controls' => '3',
  'comment_anonymous' => 0,
  'comment_subject_field' => '1',
  'comment_preview' => '1',
  'comment_form_location' => '0',
);
....

Drupal 7 export script(Sample)

$data = array(
  'bundles' => array(
    'test' => (object) array(
      'type' => 'test',
      'name' => 'Test',
      'base' => 'node_content',
      'module' => 'node',
      'description' => '',
      'help' => '',
      'has_title' => '1',
      'title_label' => 'Title',
      'custom' => '1',
      'modified' => '1',
      'locked' => '0',
      'disabled' => '0',
      'orig_type' => 'test',
      'disabled_changed' => FALSE,
      'bc_entity_type' => 'node',
    ),
  ),
.....
summit’s picture

Hi,
I know that version 2.24 of Node Export had this functionality. https://www.drupal.org/project/node_export
greetings, Martijn