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.
I created a content type on one server, exported it with content_copy, and tried to reimport into another Drupal install. I got the following error:
You can't show more empty location forms than the maximum number of locations allowed for this content type.
I did not enable location for this content type, and there appears to be noting about it in the content export. Below is the content of the exported node:
$content[type] = array (
'name' => 'Panel lead article',
'type' => 'panel_lead_article',
'description' => '',
'title_label' => 'Title',
'body_label' => '',
'min_word_count' => '0',
'help' => '',
'node_options' =>
array (
'status' => true,
'promote' => true,
'sticky' => false,
'revision' => false,
),
'language_content_type' => '0',
'upload' => '1',
'addthis_nodetype' => 1,
'forward_display' => 1,
'search_block' => false,
'trackback' => '0',
'i18n_node' => '1',
'old_type' => 'panel_lead_article',
'orig_type' => '',
'module' => 'node',
'custom' => '1',
'modified' => '1',
'locked' => '0',
'content_profile_use' => 0,
'comment' => '0',
'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',
'print_display' => 0,
'print_display_comment' => 0,
'print_display_urllist' => 0,
'menu' =>
array (
'menu-about---related' => false,
'menu-about-concern' => false,
'menu-administration' => false,
'menu-blog-related-links' => false,
'menu-blogs--feeds' => false,
'devel' => false,
'menu-donate---relate' => false,
'menu-donor---donor-i' => false,
'menu-for-the-media' => false,
'menu-get-involved---1' => false,
'menu-get-involved---' => false,
'menu-get-involved---0' => false,
'menu-get-involved---2' => false,
'menu-important-links' => false,
'menu-in-depth' => false,
'menu-issues' => false,
'menu-make-a-donation' => false,
'navigation' => false,
'menu-other-ways-to-donate-2' => false,
'primary-links' => false,
'menu-resources' => false,
'secondary-links' => false,
),
'xmlsitemap_node_type_priority' => '-1',
'xmlsitemap_old_priority' => '-1',
);
Comment | File | Size | Author |
---|---|---|---|
#5 | location.module.patch | 1.45 KB | Kristen Pol |
#2 | location_376228.patch | 667 bytes | clemens.tolboom |
Comments
Comment #1
mrfelton CreditAttribution: mrfelton commentedlocation.module, line 1760:
Change the default vale from 3 to 0. This also fixes a problem on the node create, where the same validation error occurs if the user does not enable location for a content type, and does not manually change this field from 3 to 0.
Comment #2
clemens.tolboomPatch attached. Great module.
Comment #3
clemens.tolboomComment #4
futuresoon CreditAttribution: futuresoon commentedI was also able to solve this by installing the 6.x-dev instead of the recommended
Comment #5
Kristen PolThe structure changed from 3.0 to 3.x-dev (location_node.module now has the relevant code instead of location.module). So, if you don't want to upgrade yet to the dev version, you can use this patch.
Comment #6
YesCT CreditAttribution: YesCT commentedduplicate of #380220: Default values for numbers incompatible
Comment #7
venusrising CreditAttribution: venusrising commentedDoes anyone know if this patch will be applied to a stable build?
Comment #8
venusrising CreditAttribution: venusrising commentedWeird, I never got an update notification for the stable rc1 build but it fixes the issue.
Comment #9
ellanylea CreditAttribution: ellanylea commentedSame problem of "Can not import content type when location module is enabled"
Installed dev version of 2010-Jan-23 and all is right with the world.
Thanks!