When an Address CCK field already created is edited, the radios that contain the options of the field do not reflect their current values.

To reproduce:

1) Create an Address CCK field.
2) Enable only country and city.
3) Save.
4) Edit the field again.

Yup! It looks like other fields are enabled, though it's just because the default_value of the FAPI element is not correctly set, I think.

Comments

markus_petrux’s picture

After step 3 above, the global settings for the field stored in the {content_node_field} table, once unserialized, look like this:

$global_fields = array(
  'aname' => '0',
  'street' => '0',
  'additional' => '0',
  'city' => '0',
  'province' => '0',
  'country' => '1',
  'postal_code' => '0',
  'is_primary' => '0',
  'phone' => '0',
  'fax' => '0',
  '#theme' => '',
);

So the values where saved correctly, and if I go to create a node of that type, the add/edit form is built correctly.

The problem seems to be in addresses_cck_field_settings(), when the CCK field settings form is built. The way the #default_values of the radios are built seem to be the cause of the problem.

markus_petrux’s picture

Title: CCK field global settings do not reflect current value » CCK global field settings do not reflect current value

Oops! Sorry, typo in issue title.

codycraven’s picture

Status: Active » Fixed

This is fixed within the dev release

Status: Fixed » Closed (fixed)

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