-
Type: Bug Report
-
Status: Closed
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 5.2.1-B2
-
Component/s: File Uploader
-
Labels:None
-
Change Log Group:Fixed
-
Change Log Message:Uploaded files were lost, when uploader was used on form with AJAX-based validation.
-
Story Points:2
-
Copy Issue Key:
-
Patch Instructions:
When we're using FormManager class to submit/validate a form via ajax, then it breaks down any newly uploaded files (name of file on disk differs from one in the field) in case if validation error happens in any of the fields on that form.
This happens, because in every event, that FormManager triggers (e.g. OnValidateField, OnCreateAjax, OnUpdateAjax, etc.) it calls $object->SetFieldsFromHash($field_hash) method, that also copies uploaded file from /system/tmp/ folder to live folder. However it doesn't tell back to FormManager, that file was moved and he should update file upload control with new file location.