Closed (fixed)
Project:
Phone Number
Version:
6.x-1.0-beta1
Component:
User interface
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Dec 2010 at 21:05 UTC
Updated:
16 Dec 2010 at 08:46 UTC
When first selecting a country code for a node (e.g. Australia (+61)) and then editing the node, the selected country code is not the one associated with the node. It is the default country code specified in the content type's field configuration settings. Is it possible that if a node has a set value for country code that it can take precedence in being selected instead of the default country code?
Otherwise when editing nodes many times, if I forget just one time to reset the country code, then the value will not be accurate.
Comments
Comment #1
mizerydearia commentedSee http://drupal.org/node/996278
Comment #2
mizerydearia commentedActually, the other support request is for different version. Reopened.
Comment #3
mizerydearia commentedfix: See line 666
from:
'#default_value' => isset($element['#value']['country_codes']) ? $element['#value']['country_codes'] : isset($field['default_country']) ? $field['default_country'] : NULL,to:
'#default_value' => isset($element['#value']['country_codes']) ? $element['#value']['country_codes'] : (isset($field['default_country']) ? $field['default_country'] : NULL),Comment #4
wouter99999 commentedDear Mizydearia, thanks for your help! Acually that line does not exist in my (patched with cck_phone-d7_r3.patch) D7 version of the module. But your fix got me a clou, and I could fix it now (line 750) :
from: '#default_value' => isset($settings['default_country']) ? $settings['default_country'] : NULL,
to: '#default_value' => isset($element['#value']['country_codes']) ? $element['#value']['country_codes'] : (isset($settings['default_country']) ? $settings['default_country'] : NULL),
Comment #5
ckngFor D6, this is fixed in the dev.
D7 is fixed just not yet re-roll the patch.