Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 1.9
-
Fix Version/s: None
-
Component/s: Core CiviCRM
-
Labels:None
Description
When a profile field is created using a custom data field of type "Link" it's not displayed correctly in the Drupal
My Account section.
The fix for the bug is given below.
[root@bfc22 modules]# diff civicrm/CRM/Core/BAO/UFGroup.php civicrm/CRM/Core/BAO/UFGroup.php.org
846,848d845
<
< /****
<
859,860d855
<
< ****/
[root@bfc22 modules]#
essentially the code there does the following
if ( $field['visibility'] == "User and User Admin Only"|| $field['visibility'] == "Public User Pages" ) {
$customFieldID = CRM_Core_BAO_CustomField::getKeyID($field['name']);
if ( CRM_Core_BAO_CustomField::getKeyID($field['name']) ) {
$htmlType = CRM_Core_DAO::getFieldValue( 'CRM_Core_DAO_CustomField', $customFieldID, 'html_type', 'id' );
if($htmlType == 'Link')
}
}
so it can be seen that for type = link it's adding another A href which it already gets from
values[$index] = CRM_Core_BAO_CustomField::getDisplayValue( $customVal, $cfID, $options );
Thanks.
Prakash.