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

Unzipped Embedded Files Disappear when Topic is Saved

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Test 1

      1. Log in as Admin.
      2. Create a Course.
      3. Go to the Course and turn editing on.
      4. Edit a section other than section 0.
      5. Click on the 'Manage files" button in the editor.
      6. Upload the attached zip file (mdl51327edited.zip).
      7. Unzip it, and close the dialogue.
      8. Click on the anchor button and browse repositories.
      9. From the 'Embedded files' section open the folder created for the zip, and select one of the files within it.
      10. Insert the link.
      11. Save the section
      12. Try accessing the new link.
        • make sure you are redirected to the uploaded file.

      Test 2 (Test whether images/videos are inserted properly)

      1. Log in as Admin.
      2. Create a Course.
      3. Go to the Course and turn editing on.
      4. Edit a section other than section 0.
      5. Click on the 'Manage files" button in the editor.
      6. Upload the attached zip file (mdl51327edited.zip).
      7. Unzip it, and close the dialogue.
      8. Click on the "Insert or edit image" button in the editor.
      9. From the 'Embedded files' section open the folder created for the zip, and select the image file within it.
      10. Save image.
      11. Click on the "Insert media" button in the editor.
      12. In the video tab, browse repositories.
      13. From the 'Embedded files' section open the folder created for the zip, and select the video file within it.
      14. Insert media.
      15. Save the section.
        • make sure the image and video are properly displayed in the section's summary
      Show
      Test 1 Log in as Admin. Create a Course. Go to the Course and turn editing on. Edit a section other than section 0. Click on the 'Manage files" button in the editor. Upload the attached zip file (mdl51327edited.zip). Unzip it, and close the dialogue. Click on the anchor button and browse repositories. From the 'Embedded files' section open the folder created for the zip, and select one of the files within it. Insert the link. Save the section Try accessing the new link. make sure you are redirected to the uploaded file. Test 2 (Test whether images/videos are inserted properly) Log in as Admin. Create a Course. Go to the Course and turn editing on. Edit a section other than section 0. Click on the 'Manage files" button in the editor. Upload the attached zip file (mdl51327edited.zip). Unzip it, and close the dialogue. Click on the "Insert or edit image" button in the editor. From the 'Embedded files' section open the folder created for the zip, and select the image file within it. Save image. Click on the "Insert media" button in the editor. In the video tab, browse repositories. From the 'Embedded files' section open the folder created for the zip, and select the video file within it. Insert media. Save the section. make sure the image and video are properly displayed in the section's summary
    • Affected Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE
    • Fixed Branches:
      MOODLE_36_STABLE, MOODLE_37_STABLE
    • Pull 3.6 Branch:
    • Pull 3.7 Branch:
    • Pull Master Branch:
      MDL-51327-master

      Description

      Issue: When you upload an zip file into the Embedded Files section of a Topic, and unzip it, and link to those unzipped files, they dissappear after "Save Changes" is clicked in the topic.

      Steps to replicate:

      {.... has been put in place in parts of the URL to not identify direct sites and content}

      Prequisite:
      -Have Embedded files turned on such that the Embedded Files (Manage Files) icon shows in the Text Editor
      -Have a zip file that expands to a director and contains a directory structure.
      -Ensure the Atto Editor is being used as the text editor

      -Create a Course
      -Go to Topic 1,2,3... (just not 0) and Edit it
      -Click on Embedded Files/Manage Files icon in the text editor
      -Upload the zip file
      -Click the file just uploaded
      -Click the Unzip Button (may take a few minutes)
      --Navigate into the folder to verify files expanded as it should.
      -Close Manage Files popup
      -Click the Link icon to create a Link
      -Click Browse Repositories
      -Select Embedded Files (You should see what you saw in the Manage Files pop-up)
      -Navigate to the File you want to link with in the expanded folder
      -Click "Select This File"
      -Link gets created (Example: http://...../draftfile.php/15/user/draft/781419109/.../index.html)
      -Click "Save Changes" (You will see a popup from Chrome asking if you are sure you want to navigate away from this page, like there are unsaved changes, thought you just clicked save)
      -The link will be created on the course page
      -Click the Link (Which now changed in the Example to this: http://..../pluginfile.php/4339/course/section/1710/.../index.html)
      -ERROR! (see below)
      -Go back to Edit the topic
      -Click the Manage Files icon
      -Only the Zip file uploaded remains.
      -You are also given the following warning that the file you linked does not exist anymore:
      "Warning! The following files that are referenced in the text area appear to be missing:
      ..../index.html"
      ____________
      Error Message:
      Sorry, the requested file could not be found

      More information about this error

      Debug info:
      Error code: filenotfound
      Stack trace:
      line 463 of /lib/setuplib.php: moodle_exception thrown
      line 1964 of /lib/filelib.php: call to print_error()
      line 4382 of /lib/filelib.php: call to send_file_not_found()
      line 37 of /pluginfile.php: call to file_pluginfile()

        Attachments

        1. MDL-51327.png
          168 kB
          Jennifer Bauzon

          Activity

            People

            • Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

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

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 47 minutes
                3h 47m