Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-51014

Clicking active repository in filepicker resets form

XMLWordPrintable

    • MOODLE_29_STABLE
    • MOODLE_28_STABLE, MOODLE_29_STABLE
    • MDL-51014-master
    • Hide

      This issue can be (but isn't always) triggered by a behat scenario that uploads a file to a file manager, submits the form, then loads another form and uploads a file the to the file manager.
      The attached mdl-51015-corrected.feature file contains such a scenario. Place it in /lib/tests/behat/, run behat init, and run behat with --tags=mdl51014

      When the bug occurrs, the second file upload will fail. If the fix works, the second file upload will never fail.

      Show
      This issue can be (but isn't always) triggered by a behat scenario that uploads a file to a file manager, submits the form, then loads another form and uploads a file the to the file manager. The attached mdl-51015-corrected.feature file contains such a scenario. Place it in /lib/tests/behat/, run behat init, and run behat with --tags=mdl51014 When the bug occurrs, the second file upload will fail. If the fix works, the second file upload will never fail.

      Note: My successful reproductions of this have all been on development machines with caching off, meaning it takes a while for the repository to load.
      Steps to reproduce:

      1. Go to a page with a form containing a file manager field (e.g. Add a File resource).
      2. Click the "Add file" button on the File Manager
      3. Select the "Upload a file" repository on the left
      4. Reload the page
      5. Click the "Add file" button on the File Manager
      6. While the "Upload a file" repository is still loading, before the spinner disappears, quickly click the "Upload a file" repository on the left.
      7. Click the "Attchement" field and select a file

      Expectation:

      • The file is attached to the form

      Actual Result:

      • The file input in the form is empty

      This causes random failures with behat tests that upload files, as behat instantly and indescriminately clicks "Upload a file" as soon as the file picker is opened.

            quen Sam Marshall
            marxjohnson Mark Johnson
            Sam Marshall Sam Marshall
            David Monllaó David Monllaó
            John Okely John Okely
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.