Uploaded image for project: '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 Master Branch:
      w50_MDL-37111_m25_forumsinglefirst

      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"

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            salvetore 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
            salvetore 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
            skodak Petr Skoda 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
            skodak Petr Skoda 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
            skodak Petr Skoda 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
            skodak Petr Skoda 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
            skodak Petr Skoda added a comment -

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

            Show
            skodak Petr Skoda added a comment - Hmm, this trick would break portfolio, reworking...
            Hide
            skodak Petr Skoda 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
            skodak Petr Skoda 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
            samhemelryk Sam Hemelryk added a comment -

            Thanks Petr - this has been integrated now

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

            This works as described.
            Thanks

            Show
            ankit_frenz Ankit Agarwal added a comment - This works as described. Thanks
            Hide
            stronk7 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
            stronk7 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:
                  Fix Release Date:
                  14/Jan/13