Create a content type with locations enabled and export it. You'll find that location is not included in the exported code:

$content[type]  = array (
  'name' => 'Event',
  'type' => 'event',
  'description' => 'An event with a start time and location which will appear in the calendar',
  'title_label' => 'Page title',
  'body_label' => 'Body',
  'min_word_count' => '0',
  'help' => '',
  'node_options' => 
  array (
    'status' => true,
    'promote' => false,
    'sticky' => false,
    'revision' => false,
  ),
  'comment' => '0',
  'forward_display' => 1,
  'image_attach' => '0',
  'image_attach_size_teaser' => 'thumbnail',
  'image_attach_weight_teaser' => '0',
  'image_attach_size_body' => 'thumbnail',
  'image_attach_weight_body' => '0',
  'upload' => '1',
  'old_type' => 'event',
  'orig_type' => 'event',
  'module' => 'node',
  'custom' => '1',
  'modified' => '1',
  'locked' => '0',
  'print_display' => 1,
  'print_display_comment' => 0,
);
$content[fields]  = array (
  0 => 
  array (
    'widget_type' => 'date_select',
    'label' => 'Start Time',
    'weight' => 0,
    'default_value' => 'blank',
    'default_value_custom' => '',
    'default_value2' => 'blank',
    'default_value_custom2' => '',
    'input_format' => 'site-wide',
    'input_format_custom' => '',
    'year_range' => '-3:+3',
    'increment' => '5',
    'text_parts' => 
    array (
    ),
    'description' => '',
    'group' => false,
    'required' => 0,
    'multiple' => 0,
    'todate' => '',
    'granularity' => 
    array (
      'Y' => 'Y',
      'M' => 'M',
      'D' => 'D',
      'H' => 'H',
      'N' => 'N',
      'S' => 0,
    ),
    'output_format_date' => 'M j Y - g:ia',
    'output_format_custom' => '',
    'output_format_date_long' => 'l, F j, Y - g:ia',
    'output_format_custom_long' => '',
    'output_format_date_medium' => 'F j, Y - g:ia',
    'output_format_custom_medium' => '',
    'output_format_date_short' => 'M j Y - g:ia',
    'output_format_custom_short' => '',
    'tz_handling' => 'none',
    'timezone_db' => 'UTC',
    'field_timezone' => 'US/Eastern',
    'field_name' => 'field_start_time',
    'field_type' => 'date',
    'module' => 'date',
  ),
);
CommentFileSizeAuthor
#3 Picture 12.png34.18 KBnickl

Comments

yesct’s picture

Issue tags: +location exporting

I wonder if cck location fields are used if they are included?

mlncn’s picture

Version: 5.x-3.x-dev » 6.x-3.0

Problem exists in 6 also, and really messes up CCK content type import / export– I think combined with or perhaps caused by the 3 location fields error when the node type isn't even trying to use location at all).

So this would be fixed if we tried the Release Candidates?

ben, agaric

nickl’s picture

Version: 6.x-3.0 » 6.x-3.x-dev
Status: Active » Fixed
StatusFileSize
new34.18 KB

Settings do get exported.

// <.................snip

$content['fields']  = array (
  0 => 
  array (
    'label' => 'Location',
    'field_name' => 'field_location',
    'type' => 'location',
    'widget_type' => 'location',
    'change' => 'Change basic information',
    'weight' => '-4',
    'description' => '',
    'default_value' => 
    array (
      0 => 
      array (
        'name' => '',
        'street' => '',
        'additional' => '',
        'city' => '',
        'province' => '',
        'postal_code' => '',
        'country' => 'us',
        'locpick' => 
        array (
          'user_latitude' => '',
          'user_longitude' => '',
        ),
        'cck_preview_in_progress' => true,
        'location_settings' => 

// snip.........................>

Importing works too.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

seanr’s picture

Status: Closed (fixed) » Active

This bug still exists. #3 only applies to location CCK fields. The export of location settings entered in the edit content type form are still lost. If we're still going to support attaching locations to node types using that method, we need to also handle the export correctly. Otherwise, it'd be better to drop that method and include an update that converts them to CCK fields or something (if that is indeed the desired method).

davisjan’s picture

I agree with seanr, the bug still exists: "The export of location settings entered in the edit content type form are still lost."

This makes it impossible to import any exported content types, not just those with CCK location fields. Attempting to import results in the error message, "You can't show more empty location forms than the maximum number of locations allowed for this content type."

pcarman’s picture

Subscribing...

Experiencing the same issue.

ankur’s picture

I think this might've been fixed in a separate ticket. If I'm wrong, please re-open this ticket.

nickl’s picture

Status: Active » Fixed

I guess it is up to me to mark it fixed again =) haven't tested at all just saw this pop up on my inbox and ankur suggested to mark it fixed, I agree.

Feel free to reactivate and motivate for it to be corrected then.

Status: Fixed » Closed (fixed)
Issue tags: -location exporting

Automatically closed -- issue fixed for 2 weeks with no activity.