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

Deleted Forum & Blog Posts in RSS Block

    Details

    • Database:
      MySQL
    • Testing Instructions:
      Hide

      Make sure that blogs and RSS are enabled. They're both under Advanced features.

      BLOG

      Go to My profile > blogs and add an entry.

      Just below the add an entry is a link to the RSS feed. Check that your new post appears in the feed (you can just open the feed in your browser and scan through the XML)

      Delete the blog post. Reload the RSS feed and check that the post is gone from the feed.

      FORUM

      Be aware that if even if you add multiple forum posts or discussions the RSS code will only update every 60 seconds. Deletions however should cause the RSS feed to be updated immediately.

      Go into the settings for a forum. Check that RSS feed is set to display some number of posts or discussion greater than 0.

      Post in the forum.

      Access the forum RSS feed via the link under forum administration. Check that your post/discussion appears.

      Delete your post and check that it is removed from the RSS feed.

      Show
      Make sure that blogs and RSS are enabled. They're both under Advanced features. BLOG Go to My profile > blogs and add an entry. Just below the add an entry is a link to the RSS feed. Check that your new post appears in the feed (you can just open the feed in your browser and scan through the XML) Delete the blog post. Reload the RSS feed and check that the post is gone from the feed. FORUM Be aware that if even if you add multiple forum posts or discussions the RSS code will only update every 60 seconds. Deletions however should cause the RSS feed to be updated immediately. Go into the settings for a forum. Check that RSS feed is set to display some number of posts or discussion greater than 0. Post in the forum. Access the forum RSS feed via the link under forum administration. Check that your post/discussion appears. Delete your post and check that it is removed from the RSS feed.
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull Master Branch:
      MDL-26170_rss
    • Sprint:
      FRONTEND Sprint 6
    • Story Points (Obsolete):
      8
    • Sprint:
      FRONTEND Sprint 6

      Description

      In Moodle 2.0.1+, even after deleting forum/blog post, it continues to show up in the RSS block even after cron is run. Spammers can exploit this.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            tsala Helen Foster added a comment -

            Manish, thanks for your report. Assigning to Dan, our RSS component lead.

            Show
            tsala Helen Foster added a comment - Manish, thanks for your report. Assigning to Dan, our RSS component lead.
            Hide
            umontgomery Ulrike Montgomery added a comment -

            We have the same problem in version 2.0.2 (20110223)

            Show
            umontgomery Ulrike Montgomery added a comment - We have the same problem in version 2.0.2 (20110223)
            Hide
            markdw Mark Ward added a comment -

            This is also an issue for us, Moodle 2.04+

            Show
            markdw Mark Ward added a comment - This is also an issue for us, Moodle 2.04+
            Hide
            phalacee Jason Fowler added a comment -

            Unassigning myself from this issue, to allow for others to take it as it comes into the sprint backlogs in the future.

            Show
            phalacee Jason Fowler added a comment - Unassigning myself from this issue, to allow for others to take it as it comes into the sprint backlogs in the future.
            Hide
            andyjdavis Andrew Davis added a comment -

            This appears to still be an issue in 2.6 dev (Build: 20131004). There seems to be something wrong with whatever is meant to remove the cached version of the RSS feed.

            Show
            andyjdavis Andrew Davis added a comment - This appears to still be an issue in 2.6 dev (Build: 20131004). There seems to be something wrong with whatever is meant to remove the cached version of the RSS feed.
            Hide
            andyjdavis Andrew Davis added a comment -

            Putting this up for peer review. The forum was quite straightforward. The blog was a little trickier. As far as I can tell only user blogs are available by RSS. I couldn't find any way to access a course blog for example by RSS, nor could I see any evidence of course blog posts being cached by the RSS system.

            Show
            andyjdavis Andrew Davis added a comment - Putting this up for peer review. The forum was quite straightforward. The blog was a little trickier. As far as I can tell only user blogs are available by RSS. I couldn't find any way to access a course blog for example by RSS, nor could I see any evidence of course blog posts being cached by the RSS system.
            Hide
            phalacee Jason Fowler added a comment -

            The code looks good to me. I think it would be worth double checking which blogs are available via RSS. I will have a look later today, or early tomorrow.

            Show
            phalacee Jason Fowler added a comment - The code looks good to me. I think it would be worth double checking which blogs are available via RSS. I will have a look later today, or early tomorrow.
            Hide
            phalacee Jason Fowler added a comment -

            Okay, so I haven't been able to find out if system wide blog posts are accessible via RSS ... I don't think so...

            Show
            phalacee Jason Fowler added a comment - Okay, so I haven't been able to find out if system wide blog posts are accessible via RSS ... I don't think so...
            Hide
            stronk7 Eloy Lafuente (stronk7) 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
            stronk7 Eloy Lafuente (stronk7) 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
            andyjdavis Andrew Davis added a comment -

            Rebased.

            Show
            andyjdavis Andrew Davis added a comment - Rebased.
            Hide
            damyon Damyon Wiese added a comment -

            Hi Andrew,

            Please provide backport branches or convince me why they are not needed.

            Thanks!

            Show
            damyon Damyon Wiese added a comment - Hi Andrew, Please provide backport branches or convince me why they are not needed. Thanks!
            Hide
            damyon Damyon Wiese added a comment -

            Reopening - please resubmit with backport branches!

            Show
            damyon Damyon Wiese added a comment - Reopening - please resubmit with backport branches!
            Hide
            cibot CiBoT added a comment -

            Moving this reopened issue out from current integration. Please, re-submit it for integration once ready.

            Show
            cibot CiBoT added a comment - Moving this reopened issue out from current integration. Please, re-submit it for integration once ready.
            Hide
            andyjdavis Andrew Davis added a comment -

            Added 2.5 and 2.4 versions. Resubmitting for integration.

            Show
            andyjdavis Andrew Davis added a comment - Added 2.5 and 2.4 versions. Resubmitting for integration.
            Hide
            poltawski 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
            poltawski 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
            andyjdavis Andrew Davis added a comment -

            Rebased.

            Show
            andyjdavis Andrew Davis added a comment - Rebased.
            Hide
            marina Marina Glancy added a comment -

            Hi Andrew,
            thanks for working on it. I'm trying to understand how rss file caching works. Can you tell me what happens if we delete extra file? Will it be re-generated next time the RSS feed is requested? Because I can see that in this line
            https://github.com/moodle/moodle/blob/master/lib/rsslib.php#L119
            we can delete way too many files - for example, if instanceid==1 we will also delete 11, 21, 341, etc.

            Another thing is I would suggest to create another issue to discuss if we want to create an upgrade script that removes files for non-existing threads and user blogs. I'm afraid it can be long but maybe we still need it

            Show
            marina Marina Glancy added a comment - Hi Andrew, thanks for working on it. I'm trying to understand how rss file caching works. Can you tell me what happens if we delete extra file? Will it be re-generated next time the RSS feed is requested? Because I can see that in this line https://github.com/moodle/moodle/blob/master/lib/rsslib.php#L119 we can delete way too many files - for example, if instanceid==1 we will also delete 11, 21, 341, etc. Another thing is I would suggest to create another issue to discuss if we want to create an upgrade script that removes files for non-existing threads and user blogs. I'm afraid it can be long but maybe we still need it
            Hide
            andyjdavis Andrew Davis added a comment -

            The RSS feed will be regenerated next time it is requested. Over enthusiastic RSS cache clearing (in the form of deleting files) is not of particularly large concern as RSS feeds (afaik).

            The upgrade code is a good idea, one I had not thought of. We may even want to simply delete all of the cached feeds and allow them to be recreated over time.

            Show
            andyjdavis Andrew Davis added a comment - The RSS feed will be regenerated next time it is requested. Over enthusiastic RSS cache clearing (in the form of deleting files) is not of particularly large concern as RSS feeds (afaik). The upgrade code is a good idea, one I had not thought of. We may even want to simply delete all of the cached feeds and allow them to be recreated over time.
            Hide
            marina Marina Glancy added a comment -

            Thanks Andrew, integrated in 2.4, 2.5 and 2.6

            Show
            marina Marina Glancy added a comment - Thanks Andrew, integrated in 2.4, 2.5 and 2.6
            Hide
            damyon Damyon Wiese added a comment -

            Tested on 24, 25 and master. Works for me.

            But - I tested and database has the same bug. I'll add a new issue for it.

            Show
            damyon Damyon Wiese added a comment - Tested on 24, 25 and master. Works for me. But - I tested and database has the same bug. I'll add a new issue for it.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            "Aequam memento rebus in arduis servare mentem"

            Many thanks for your hard work, this is now part of "Moodle, the LMS". Closing!

            Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - "Aequam memento rebus in arduis servare mentem" Many thanks for your hard work, this is now part of "Moodle, the LMS". Closing! Ciao

              People

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

                Dates

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

                  Agile