Moodle
  1. Moodle
  2. MDL-37111

Linked files cause file not found error in simple single discussion forum description

    Details

    • Testing Instructions:
      Hide

      1/ create single simple forum with linked image in intro text
      2/ verify the first post has the image
      3/ verify the delete button is not present in the first post, but is in reply
      4/ verify the edit button in first post leads to forum edit page instead of post edit
      5/ edit the introduction again and add another linked picture
      6/ verify the forum save updates the first post properly

      note: if you change forum type from single to something else only standard files are copied, the linked files are not supposed to work there, sorry.

      Show
      1/ create single simple forum with linked image in intro text 2/ verify the first post has the image 3/ verify the delete button is not present in the first post, but is in reply 4/ verify the edit button in first post leads to forum edit page instead of post edit 5/ edit the introduction again and add another linked picture 6/ verify the forum save updates the first post properly note: if you change forum type from single to something else only standard files are copied, the linked files are not supposed to work there, sorry.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull from Repository:
    • Pull 2.4 Branch:
      w50_MDL-37111_m24_forumsinglefirst
    • Pull Master Branch:
      w50_MDL-37111_m25_forumsinglefirst
    • Rank:
      46674

      Description

      When creating a linked file in the forum description of a simple single discussion forum, the link is made unavailable. I believe this is because linked files are not available in Forum posts, and the simple single discussion forum automatically converts the forum description to a post.

      Steps to reproduce:

      1. Create a forum, set the type to "A simple single discussion"
      2. In the description, create a link to a file in the Server Files repository
      3. Click Save and Display
      4. When viewing the forum, click on the hyperlink to the linked file

      Expected result: Link URL = http://preview2.mroomstest.net/pluginfile.php/3686/mod_forum/intro/donaldduck.jpg. File displays with URL
      Actual result: Link URL = http://preview2.mroomstest.net/pluginfile.php/3686/mod_forum/post/426/donaldduck.jpg. Upon clicking, the user receives the following error: "Sorry, the requested file could not be found"

        Issue Links

          Activity

          Hide
          Michael de Raadt added a comment -

          Hi, Kris.

          It looks like Petr had a go at fixing this once before.

          The links you provided don't work for me without a login. Perhaps you could attach your images or copy the error information.

          Show
          Michael de Raadt added a comment - Hi, Kris. It looks like Petr had a go at fixing this once before. The links you provided don't work for me without a login. Perhaps you could attach your images or copy the error information.
          Hide
          Petr Škoda added a comment -

          I am sorry, but I know very little about how file linking is supposed to work. I suppose this should be better fixed by the new maintainer of the file api.

          Show
          Petr Škoda added a comment - I am sorry, but I know very little about how file linking is supposed to work. I suppose this should be better fixed by the new maintainer of the file api.
          Hide
          Petr Škoda added a comment -

          Hopefully this should resolve it, the files are no longer copied form intro area to the post area, instead there is a new redirection in pluginfile.php

          Ciao

          Show
          Petr Škoda added a comment - Hopefully this should resolve it, the files are no longer copied form intro area to the post area, instead there is a new redirection in pluginfile.php Ciao
          Hide
          Petr Škoda added a comment -

          Hmm, this trick would break portfolio, reworking...

          Show
          Petr Škoda added a comment - Hmm, this trick would break portfolio, reworking...
          Hide
          Petr Škoda added a comment - - edited

          reworked, now the files are copied the same way as intro, the delete button is gone and edit button in the first post leads to forum edit page.

          Show
          Petr Škoda added a comment - - edited reworked, now the files are copied the same way as intro, the delete button is gone and edit button in the first post leads to forum edit page.
          Hide
          Sam Hemelryk added a comment -

          Thanks Petr - this has been integrated now

          Show
          Sam Hemelryk added a comment - Thanks Petr - this has been integrated now
          Hide
          Ankit Agarwal added a comment -

          This works as described.
          Thanks

          Show
          Ankit Agarwal added a comment - This works as described. Thanks
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Changes are now upstream, thanks for your collaboration!

          If you are going to have any celebration next days, enjoy with your gang, if not, too!

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Changes are now upstream, thanks for your collaboration! If you are going to have any celebration next days, enjoy with your gang, if not, too! Ciao

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: