Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.0.2
    • Fix Version/s: None
    • Component/s: Wiki (2.x)
    • Labels:
    • Affected Branches:
      MOODLE_20_STABLE
    • Rank:
      16650

      Description

      See the discussion at http://moodle.org/mod/forum/discuss.php?d=170655

      Hi everyone. I have set an assessment task for my students in a Moodle 2.0 wiki and we have the bizzarre problem that images uploaded and inserted into posts are dissappearing after several hours.

      When a user uploads an image and/or video to the wiki moodle server said image is assigned a location on the server (eg. http://moodle.uni/draftfile.php/8707/user/draft/705008760/activboard300_20090625112013.jpg) such that the image can be displayed in the users post.

      After an undefined period of time that asset is no longer linkable and will no longer display in the post. If you put in the address for the asset directly you will get a page with "Sorry, the requested file could not be found" (e.g. The link above).

      When you look at a wiki post where this has happened there will be no images in the post and/or a broken image icon (depends on how the browser handles it), but going into edit clearly shows the img tags and references to the missing image.

      Please note that a 10min test is unlikely to make this issue apparent as there appears to be some undefined period of time, or unknown trigger before the uploaded assets become dead. Create a wiki post with some uploaded images and leave a day and the issue may become apparent, or maybe there is a trigger such that the more images others upload the quicker your assets are dropped from the server. I can only speculate, but hopefully someone expert in the moodle wiki can resolve.

      Please advise ASAP.

      Best wishes,

      Matt

      Note:

      SAM Marshall responded on the discussion board:

      I don't know anything about Moodle 2 wiki. That said, I do know a bit about the file API, and draft file URLs should not be used except while you are editing content (such as a wiki page). Once the content has been saved, the version of the image that displays to users when not editing should have 'pluginfile.php' not 'draftfile.php'.

      So if, when you use the html editor to add an image to a wiki page, after you save the page, the image on the resulting page still has the URL 'draftfile.php', then imo this is almost certainly a bug in the wiki which (after making sure it still occures in the latest release version, 2.0.2 or whatever) you should report in Moodle Tracker.

      I believe the draft file areas, which are (when it's working) used only temporarily while editing, are deleted periodically in cron, which is probably what's causing your problem.

        Issue Links

          Activity

          Hide
          Helen Foster added a comment -

          Matt, thanks for your report. Adding wiki expert Dongsheng as a watcher for info.

          Show
          Helen Foster added a comment - Matt, thanks for your report. Adding wiki expert Dongsheng as a watcher for info.
          Hide
          Martin Dougiamas added a comment -

          Wiki 2 images are seriously borked, and yes Sam's assessment is basically right. Dongsheng can look into this for our next sprint.

          Show
          Martin Dougiamas added a comment - Wiki 2 images are seriously borked, and yes Sam's assessment is basically right. Dongsheng can look into this for our next sprint.
          Hide
          Dongsheng Cai added a comment -

          Hi Matt

          I understand this is the problem of draft handling in wiki 2, can you point out what pages are you looking at? And what version of moodle are you using? I tried to create a few wiki pages (both collaborative and individual modes) it works fine for me (no draft file link).

          Show
          Dongsheng Cai added a comment - Hi Matt I understand this is the problem of draft handling in wiki 2, can you point out what pages are you looking at? And what version of moodle are you using? I tried to create a few wiki pages (both collaborative and individual modes) it works fine for me (no draft file link).
          Hide
          Matt Bower added a comment -

          Hi. Many pages on our wiki. Eg, snippet from our home page:

          <p>This is the home page for the EDUC261 Learning Technology Wiki, where students upload their learning technology reviews. Note, to make a link to a new page, use double square brackets for instance: <img src="http://educmoodle.ltc.mq.edu.au/draftfile.php/8597/user/draft/897162891/WordMoodleInDoubleSquareBrackets.png" alt="The word Moodle in double square brackets" width="60" height="14" /></p>

          But the image doesn't display because after several hours it disappears.

          Moodle 2.0.2 (Build: 20110221)

          Best wishes,

          Matt

          Show
          Matt Bower added a comment - Hi. Many pages on our wiki. Eg, snippet from our home page: <p>This is the home page for the EDUC261 Learning Technology Wiki, where students upload their learning technology reviews. Note, to make a link to a new page, use double square brackets for instance: <img src="http://educmoodle.ltc.mq.edu.au/draftfile.php/8597/user/draft/897162891/WordMoodleInDoubleSquareBrackets.png" alt="The word Moodle in double square brackets" width="60" height="14" /></p> But the image doesn't display because after several hours it disappears. Moodle 2.0.2 (Build: 20110221) Best wishes, Matt
          Hide
          Dongsheng Cai added a comment -

          Hello Matt
          Sorry for delay, I couldn't reproduce the bug in my side, I created a wiki page with images, the file is not in draft area after saving it.

          Can you please let me inspect your website? You can provide the details to my email: dongsheng@moodle.com

          Show
          Dongsheng Cai added a comment - Hello Matt Sorry for delay, I couldn't reproduce the bug in my side, I created a wiki page with images, the file is not in draft area after saving it. Can you please let me inspect your website? You can provide the details to my email: dongsheng@moodle.com
          Hide
          Dongsheng Cai added a comment -

          Cannot reproduce, feel free to reopen if more details provided.

          Show
          Dongsheng Cai added a comment - Cannot reproduce, feel free to reopen if more details provided.
          Hide
          Caroline Moore added a comment -

          I'm having this exact problem in Moodle 2.4.5+ (Build: 20130815). The URLs of inserted images continue to point to draftfile.php instead of changing to point to pluginfile.php when they are saved. After an hour or so, the images disappear from the wiki pages, presumably because Moodle has run some sort of cleanup task to empty the temp directory used for uploading files.

          Is there an official fix for this? This is a pretty major bug, since it means a huge part of the wiki functionality does not work (but appears initially to work - which makes it even worse).

          I'm going to test out the solution reported in this thread: https://moodle.org/mod/forum/discuss.php?d=185839

          Show
          Caroline Moore added a comment - I'm having this exact problem in Moodle 2.4.5+ (Build: 20130815). The URLs of inserted images continue to point to draftfile.php instead of changing to point to pluginfile.php when they are saved. After an hour or so, the images disappear from the wiki pages, presumably because Moodle has run some sort of cleanup task to empty the temp directory used for uploading files. Is there an official fix for this? This is a pretty major bug, since it means a huge part of the wiki functionality does not work (but appears initially to work - which makes it even worse). I'm going to test out the solution reported in this thread: https://moodle.org/mod/forum/discuss.php?d=185839
          Hide
          Greg Gerber added a comment -

          I am experiencing the same issue. Michael - if you need access to a site with the issue, let me know and I am happy to coordinate access for you.

          Show
          Greg Gerber added a comment - I am experiencing the same issue. Michael - if you need access to a site with the issue, let me know and I am happy to coordinate access for you.
          Hide
          Marianne Michel added a comment -

          We have also exactly the same issue.
          The URLs of inserted images continue to point to draftfile.php instead of changing to point to pluginfile.php when they are saved.
          2.5.1+ (Build: 20130808)

          It should be great to get an fix for this.

          Show
          Marianne Michel added a comment - We have also exactly the same issue. The URLs of inserted images continue to point to draftfile.php instead of changing to point to pluginfile.php when they are saved. 2.5.1+ (Build: 20130808) It should be great to get an fix for this.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: