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

Can't delete the last file from filearea (under some circumstances)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.4.6, 2.5.2, 2.6
    • Fix Version/s: 2.4.7, 2.5.3
    • Component/s: Files API
    • Labels:
    • Testing Instructions:
      Hide

      For 2.5 and 2.6:
      Precisely repeat the following instructions, first on current stable/master (make sure there is an error and now you have corrupted DB), THEN UPGRADE, then check again for the same course and for the new course. Make sure there is no error.

      1. Create new course, leave all fields default/empty. SAVE
      2. Edit course, add an image file in summary files. SAVE
      3. Edit course, change nothing. SAVE
      4. Edit course, delete the file from summary files. SAVE
      5. Edit course again - summary files should be empty

      For 2.4

      1. Edit a course section (or course settings, or any form with texteditor)
      2. Add an image to the editor. Save the form
      3. Edit the same form again, change nothing. Save
      4. Turn off javascript (to have access to filearea attached to texteditor)
      5. Edit the same form again, delete the embedded file from text area. Save
      6. Edit the same form again, make sure that file is not there.
      Show
      For 2.5 and 2.6: Precisely repeat the following instructions, first on current stable/master (make sure there is an error and now you have corrupted DB), THEN UPGRADE, then check again for the same course and for the new course. Make sure there is no error. Create new course, leave all fields default/empty. SAVE Edit course, add an image file in summary files. SAVE Edit course, change nothing. SAVE Edit course, delete the file from summary files. SAVE Edit course again - summary files should be empty For 2.4 Edit a course section (or course settings, or any form with texteditor) Add an image to the editor. Save the form Edit the same form again, change nothing. Save Turn off javascript (to have access to filearea attached to texteditor) Edit the same form again, delete the embedded file from text area. Save Edit the same form again, make sure that file is not there.
    • Workaround:
      1. Edit the course
      2. Delete the naughty file from course summary files.
      3. Add another file
      4. Save the course
      5. Edit the course
      6. Delete the file
      7. Save the course
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull Master Branch:
      wip-MDL-41337-master
    • Story Points (Obsolete):
      20

      Description

      I added an image via the file uploader in the course summary to test out the feature. I didn't like the way it works, so I deleted it. And it returns as soon as I click 'save changes'. So I deleted it again. And it returns. It won't stay deleted!

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  4 Vote for this issue
                  Watchers:
                  14 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    11/Nov/13