Moodle
  1. Moodle
  2. MDL-26500

rss.xml files are not showing image attachments

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.1, 2.1, 2.2.2, 2.3
    • Fix Version/s: 2.1.6, 2.2.3
    • Component/s: RSS
    • Labels:
    • Environment:
      LAMP
    • Database:
      MySQL
    • Testing Instructions:
      Hide

      For ease of testing we will setup our test site to allow guests all over.

      Setup

      1. In Admin > Permissions > User Policies, Enable autologinguests
      2. In Admin > Advanced features > Enable RSS
      3. In Admin > Plugins > [Forum & Glossary] > Enable RSS
      4. In Admin > Advanced features > set blog visbility to word accessible

      Setup Course

      1. Create a new course and set guest access to yes

      Forum Article Feed

      1. Create a new forum activity setting 'RSS feed for this activity': Posts and number of rss articles: 20
      2. Post in the forum and use the image button on tinymce to embed an uploaded image in the post text
      3. Use an RSS reader to view the feed for this forum (See the link in nav block 'RSS feed of posts' for the url)
      4. You should have images embeded and displayed within the posts

      Forum Discussion Feed

      1. Create a new forum activity setting 'RSS feed for this activity': Discussions and number of rss articles: 20
      2. Post in the forum and use the image button on tinymce to embed an uploaded image in the post text
      3. Use an RSS reader to view the feed for this forum (See the link in nav block 'RSS feed of discussion' for the url)
      4. You should have images embeded and displayed within the posts

      Glossary

      1. Create a new forum activity setting 'RSS feed for this activity' to concepts with author and number of rss articles:3
      2. Add a new glossary enrtry and use the image button on tinymce to embed an uploaded image in the entry text
      3. Use an RSS reader to view the feed for this forum (See the link in nav block 'RSS feed for this activity' for the url)
      4. You should have images embeded and displayed within the posts

      Blog

      1. Add a new blog enrtry and use the image button on tinymce to embed an uploaded image in the entry text
      2. Use an RSS reader to view the feed for this forum (See the link in nav block 'Blog RSS feed' for the url)
      3. You should have images embeded and displayed within the posts
      Show
      For ease of testing we will setup our test site to allow guests all over. Setup In Admin > Permissions > User Policies, Enable autologinguests In Admin > Advanced features > Enable RSS In Admin > Plugins > [Forum & Glossary] > Enable RSS In Admin > Advanced features > set blog visbility to word accessible Setup Course Create a new course and set guest access to yes Forum Article Feed Create a new forum activity setting 'RSS feed for this activity': Posts and number of rss articles: 20 Post in the forum and use the image button on tinymce to embed an uploaded image in the post text Use an RSS reader to view the feed for this forum (See the link in nav block 'RSS feed of posts' for the url) You should have images embeded and displayed within the posts Forum Discussion Feed Create a new forum activity setting 'RSS feed for this activity': Discussions and number of rss articles: 20 Post in the forum and use the image button on tinymce to embed an uploaded image in the post text Use an RSS reader to view the feed for this forum (See the link in nav block 'RSS feed of discussion' for the url) You should have images embeded and displayed within the posts Glossary Create a new forum activity setting 'RSS feed for this activity' to concepts with author and number of rss articles:3 Add a new glossary enrtry and use the image button on tinymce to embed an uploaded image in the entry text Use an RSS reader to view the feed for this forum (See the link in nav block 'RSS feed for this activity' for the url) You should have images embeded and displayed within the posts Blog Add a new blog enrtry and use the image button on tinymce to embed an uploaded image in the entry text Use an RSS reader to view the feed for this forum (See the link in nav block 'Blog RSS feed' for the url) You should have images embeded and displayed within the posts
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      wip-MDL-26500
    • Rank:
      16097

      Description

      Image attachments are not diaplayed in rss.xml files for forum & blog posts (not tested for glossary etc.). Instead, something like, "PLUGINFILE /RM1.jpg" alt="" width="387" height="162" />" is displayed.

        Issue Links

          Activity

          Hide
          Manish Verma added a comment -

          On upgrade from 2.0.1+ to 2.1, I noticed the issue in 2.1 also.

          Show
          Manish Verma added a comment - On upgrade from 2.0.1+ to 2.1, I noticed the issue in 2.1 also.
          Hide
          Michael Hughes added a comment - - edited

          not sure if this is related but RSS block won't show a channel image if available, just displays broken image link (see attached image)

          ... ah, seems this is just the moodle.org rss image then! works fine with BBC etc ... please ignore.

          Show
          Michael Hughes added a comment - - edited not sure if this is related but RSS block won't show a channel image if available, just displays broken image link (see attached image) ... ah, seems this is just the moodle.org rss image then! works fine with BBC etc ... please ignore.
          Hide
          Eloy Lafuente (stronk7) added a comment - - edited

          Well, I think we need, ASAP:

          1) Add the missing file_rewrite_pluginfile_urls() to all RSS generators missing them: forum, glossary, data, blog, useful posts...

          And, once working for public content...

          2) We need to define what happens with "protected" images (aka, images requiring cap check and/or be logged to access). As Glenn pointed @ MDL-26311, perhaps we could make some "magic" with the token and provide an alternative validation method, much like it has been done by the webservice_pluginfile.php, into a new, specialised, rss_pluginfile.php or so.

          But I think we should fix the missing calls (1) ASAP, so at least the urls will be correct, instead of those unconverted PLUGINFILEs. (2) can be made in separate, followup, issue.

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - - edited Well, I think we need, ASAP: 1) Add the missing file_rewrite_pluginfile_urls() to all RSS generators missing them: forum, glossary, data, blog, useful posts... And, once working for public content... 2) We need to define what happens with "protected" images (aka, images requiring cap check and/or be logged to access). As Glenn pointed @ MDL-26311 , perhaps we could make some "magic" with the token and provide an alternative validation method, much like it has been done by the webservice_pluginfile.php, into a new, specialised, rss_pluginfile.php or so. But I think we should fix the missing calls (1) ASAP, so at least the urls will be correct, instead of those unconverted PLUGINFILEs. (2) can be made in separate, followup, issue. Ciao
          Hide
          Eloy Lafuente (stronk7) added a comment -

          ping!

          Show
          Eloy Lafuente (stronk7) added a comment - ping!
          Hide
          Dan Poltawski added a comment -
          Show
          Dan Poltawski added a comment - Untested patch for forum: https://github.com/danpoltawski/moodle/compare/wip-MDL-26500
          Hide
          Dan Poltawski added a comment -

          Ok so it looks like mod/data is OK, but i've fixed blog, glossary and forum

          Show
          Dan Poltawski added a comment - Ok so it looks like mod/data is OK, but i've fixed blog, glossary and forum
          Hide
          Dan Poltawski added a comment -

          Dear peer reviewer: please note the branches have slight differences

          Show
          Dan Poltawski added a comment - Dear peer reviewer: please note the branches have slight differences
          Hide
          Dan Poltawski added a comment -

          I have only done part 1 of eloys suggestion. I am not sure about (2) myself - exposing a magic token so readily to users in RSSS feeds

          Show
          Dan Poltawski added a comment - I have only done part 1 of eloys suggestion. I am not sure about (2) myself - exposing a magic token so readily to users in RSSS feeds
          Hide
          Dan Poltawski added a comment -

          Well, I asked 3 times for a peer review and didn't get one, so submitting for integration.

          Show
          Dan Poltawski added a comment - Well, I asked 3 times for a peer review and didn't get one, so submitting for integration.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          (well done!)

          Show
          Eloy Lafuente (stronk7) added a comment - (well done!)
          Hide
          Dan Poltawski added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Dan Poltawski added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Integrated, thanks! (21, 22 & master)

          Show
          Eloy Lafuente (stronk7) added a comment - Integrated, thanks! (21, 22 & master)
          Hide
          Adrian Greeve added a comment -

          Tested with versions 2.1, 2.2 and master. RSS feeds are displaying pictures as required.
          Thanks Dan for your help.

          Show
          Adrian Greeve added a comment - Tested with versions 2.1, 2.2 and master. RSS feeds are displaying pictures as required. Thanks Dan for your help.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          This has been near becoming rejected, because it's not the best code you are able to produce.

          But, luckily, at the end, it has landed and has been spread to all repos out there.

          Many thanks and, don't forget it, keep improving your skills, you can!

          Closing, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - This has been near becoming rejected, because it's not the best code you are able to produce. But, luckily, at the end, it has landed and has been spread to all repos out there. Many thanks and, don't forget it, keep improving your skills, you can! Closing, ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved: