Exported selected fields from a content type and tried to import them into existing content type on a live server (local server is an exact copy of the live one) and got an error indicating that default value is unacceptable (this is not an exact wording though)... The dogwatch save this message "Illegal choice in 'whatever' element."

Comments

merlinofchaos’s picture

Status: Active » Postponed (maintainer needs more info)

Fields from a content type? This doesn't sound like Views. Do you mean CCK?

yched’s picture

Project: Views (for Drupal 7) » Content Construction Kit (CCK)
Version: 5.x-1.6-beta5 » 5.x-1.5
Component: Code » General

Yep, definitely sounds CCK

gemini’s picture

grrr... crap! Sorry for the confusion - it is CCK... I just updated my views and was working with them as well...

here is the export output

$content[type]  = array (
  'name' => 'New Lead',
  'type' => 'leads',
  'description' => '',
  'title_label' => 'First and Last Name',
  'body_label' => '',
  'min_word_count' => '0',
  'help' => '',
  'node_options' => 
  array (
    'status' => true,
    'promote' => false,
    'sticky' => false,
    'revision' => false,
  ),
  'comment' => '2',
  'nodefamily_max' => 0,
  'nodeprofile' => 0,
  'prepopulate_allowed' => true,
  'old_type' => 'leads',
  'orig_type' => '',
  'module' => 'node',
  'custom' => '1',
  'modified' => '1',
  'locked' => '0',
);
$content[fields]  = array (
  0 => 
  array (
    'widget_type' => 'options_buttons',
    'label' => 'Activity',
    'weight' => '0',
    'description' => '',
    'field_activity' => 
    array (
      'key' => false,
    ),
    'default_value_php' => '',
    'group' => 'group_generation_info',
    'required' => '1',
    'multiple' => '0',
    'text_processing' => '0',
    'max_length' => '',
    'allowed_values' => 'Initial Contact
Responding
Not Responding',
    'allowed_values_php' => '',
    'field_name' => 'field_activity',
    'field_type' => 'text',
    'module' => 'text, optionwidgets',
    'default_value' => 
    array (
    ),
  ),
  1 => 
  array (
    'widget_type' => 'options_buttons',
    'label' => 'Level of Interest',
    'weight' => '0',
    'description' => '',
    'field_level_of_interest' => 
    array (
      'key' => false,
    ),
    'default_value_php' => '',
    'group' => 'group_generation_info',
    'required' => '0',
    'multiple' => '0',
    'text_processing' => '0',
    'max_length' => '',
    'allowed_values' => 'High
Medium
Low',
    'allowed_values_php' => '',
    'field_name' => 'field_level_of_interest',
    'field_type' => 'text',
    'module' => 'text, optionwidgets',
  ),
  2 => 
  array (
    'widget_type' => 'options_select',
    'label' => 'Moving On',
    'weight' => '0',
    'description' => '',
    'field_moving_on' => 
    array (
      'key' => false,
    ),
    'default_value_php' => '',
    'group' => 'group_generation_info',
    'required' => '0',
    'multiple' => '0',
    'text_processing' => '0',
    'max_length' => '',
    'allowed_values' => '1|January
2|February
3|March
4|April
5|May
6|June
7|July
8|August
9|September
10|October
11|November
12|December',
    'allowed_values_php' => '',
    'field_name' => 'field_moving_on',
    'field_type' => 'text',
    'module' => 'text, optionwidgets',
  ),
);

svogel’s picture

Hi there,

I'm facing the same problem. As far as I've tracked that down, it seems to me that you have exactly the same issue.
When exporting "bool"-fields the export-array shows:

0 =>
  array (
    'widget_type' => 'options_buttons',
    'label' => 'Activity',
    ....
    'field_activity' =>
    array (
      'key' => false,
    ),

Though it should be:

0 =>
  array (
    'widget_type' => 'options_buttons',
    'label' => 'Activity',
    ....
    'field_activity' =>
    array (
      'value' => false,
    ),

Currently I'm simply replacing that with an editor prior importing it again.

Best regards
Stefan

dopry’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

been 6 months with no update. closing.