Details
-
Type: Bug
-
Status: To Backport
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.3.5
-
Fix Version/s: 4.4.0
-
Component/s: None
-
Labels:None
Description
This seems to be a regression of the bug described in CRM-1620 :
- create a mandatory custom field on a contact record
- create a new contact, upload a file in the custom field
- edit contact, click save: CiviCRM will output an error that the file is mandatory. (but it has already been uploaded)
The fix from CRM-1620 seems to be to check if there is already a value in Core/BAO/CustomGroup.php
$groupId = CRM_Utils_Array::value('id', $group); foreach ($group['fields'] as $field) { $required = CRM_Utils_Array::value('is_required', $field); //fix for CRM-1620 if ($field['data_type'] == 'File') { if (isset($field['customValue']['data'])) { $required = 0; } }
However, inspecting $field in 4.3 doesn't show any $field['customValue']['data'].