Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-1252

Update uploader hidden fields when doing AJAX-based form validation

    XMLWordPrintable

    Details

    • 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:

      Patches must be submitted through Phabricator.

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex Alex
                Reporter:
                alex Alex
                Developer:
                Alex
                Reviewer:
                Dmitry Andrejev [Intechnic]
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: