Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 2.1.5
-
Fix Version/s: None
-
Component/s: CiviCRM API
-
Labels:None
Description
When using the civicrm API function civicrm_contact_add, the location/address fields seem to be ignored.
Here is an example of $params before and after the call:
c.f. http://paste2.org/p/158864
Array (
[first_name] => John
[last_name] => Doe
[email] => johndoe@example.org
[contact_type] => Individual
[job_title] => Assistant Professor
[nick_name] => johndoe
[phone] => 5551231234
[custom_4] => 200010173
[current_employer] => Foo
[location] => Array
(
[1] => Array
(
[is_primary] => 1
[location_type_id] => 1
[address] => Array
(
[street_address] => 1 Washington Village, Apt. 1A
[city] => New York
[postal_code] => 10010
[country_id] => 1228
[state_province_id] => 1031
)
)
)
)
-----------------------
Array (
[first_name] => John
[last_name] => Doe
[contact_type] => Individual
[job_title] => Assistant Professor
[nick_name] => johndoe
[phone] => 5551231234
[custom_4] => 200010173
[current_employer] => Foo
[location] => Array
(
[1] => Array
(
[location_type_id] => 1
[is_primary] => 1
[email] => Array
(
[1] => Array
(
[email] => johndoe@example.org
[is_primary] => 1
)
)
)
)
[custom] => Array
(
[4] => Array
(
[id] =>
[value] => 200010173
[type] => String
[custom_field_id] => 4
[custom_group_id] => 1
[table_name] => civicrm_value_member_custom_info_1
[column_name] => member_id_4
[file_id] =>
)
)
[is_deceased] =>
[contact_id] => 219
)