Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Admin -> Content types - > Export
After exporting and importing a content type with related content enabled; the related content settings are not carriued over to the target content type. All fields and field settings (no problematic CCK fields) are exporting/importing without a problem. The code generated by export function is including related content settings but they are not enabled/transferred after an import.
Here is the related output from an export operation:
'format' => '2',
'relatedcontent_enabled' => 1,
'relatedcontent_length' => '20',
'relatedcontent_exclude_teasers' => '1',
'relatedcontent_output_placing' => 'end',
'relatedcontent_output_teasers' => '1',
'relatedcontent_output_grouped' => 'view',
'views' =>
array (
'enabled' =>
array (
2 => '0',
4 => '0',
16 => '1',
'archive' => '0',
'apk_user_posts' => '0',
'feeds' => '0',
'flag_bookmarks_tab' => '0',
'flag_bookmarks' => '0',
'og_ghp_ron' => '0',
'og_files' => '0',
'og_unread' => '0',
'og_search' => '0',
'og_mytracker' => '0',
'og_my' => '0',
'og_recent_type_term' => '0',
'og' => '0',
'og_tracker' => '0',
'rsvp_myinvitations' => '0',
),
'title' =>
array (
2 => '',
4 => '',
16 => 'Related',
17 => '',
18 => '',
'archive' => '',
'apk_user_posts' => '',
'feeds' => '',
'flag_bookmarks_tab' => '',
'flag_bookmarks' => '',
'og_ghp_ron' => '',
'og_files' => '',
'og_unread' => '',
'og_search' => '',
'og_mytracker' => '',
'og_my' => '',
'og_recent_type_term' => '',
'og' => '',
'og_tracker' => '',
'rsvp_myinvitations' => '',
),
),
);
Comments
Comment #1
Wisif CreditAttribution: Wisif commentedI have a content type (page) exported and then imported with cck (without the cck fields), but I can not reproduce the bug.
For example: I exported the page nodetype and change the name and type other name by importing the nodetype:
to:
'name' => 'News'
'type' => 'news'
After the importing the new content-type, the related content settings are correctly imported.
$content['type'] = array (
'name' => 'News',
'type' => 'news',
'description' => 'A page, similar in form to a story, is a simple method for creating and displaying information that rarely changes, such as an "About us" section of a website. By default, a page entry does not allow visitor comments and is not featured on the site\'s initial home page.',
'title_label' => 'Title',
'body_label' => 'Body',
'min_word_count' => '0',
'help' => '',
'input_formats' =>
array (
1 => true,
0 => 1,
2 => false,
3 => false,
5 => false,
),
'relatedcontent_enabled' => 1,
'relatedcontent_length' => '100',
'relatedcontent_exclude_teasers' => '1',
'relatedcontent_output_placing' => '0',
'relatedcontent_output_teasers' => '1',
'relatedcontent_output_grouped' => '0',
'views' =>
array (
'enabled' =>
array (
1 => '0',
2 => '0',
3 => '1',
),
'title' =>
array (
1 => '',
2 => '',
3 => 'News overview',
),
),
);
Comment #2
peter-boeren CreditAttribution: peter-boeren commented