we have an rss feed set up on our news forum (Moodle 1.9.1). If we delete an item of news in the forum it stays in the rss feed long after the Cron has been run. In fact they won't disappear until a new news item is added, so they could be hanging around for days.
Can anything be done as we don't always have a new item to add. I was looking at the forum thread that is suggesting using a different block entirely as the moodle one might be out of date (http://blogs.reed.edu/moodle/2008/07/rssatom-feed-block.html) , but that sounds like overkill for a bit of a hiccup.
I've had a brief look at the block in the thread mentioned above, but that manages to pick up the deleted item too, so now I think it is the output rather than the pick up that causing 'dead' items to appear.
I've tried dropping the cache to 1 minute, making sure the cron runs and the dead item is still there.
I've had a look at the database, but I don't really know which table I'm looking for for rss outputs. I thought the forum table, but my deleted item does not appear to be in it so that can't be where it is coming from.
It isn't the block_rss table that just lists all the feeds added.
Any ideas would be lovely.
Can I tinker with the database or something and if so which / where / what.
I checked the forum table and the discussion table and the item I don't want is definitely not there so how do I make the rss let go of it.
Any ideas please?
It also happens for RSS feeds of glossaries. I've got quite a few RSS feeds on my site . I trick it by manually copying (and deleting the original) the latest entry I want to keep. The next cronjob then refreshes the RSS feed automatically. It's not perfect but it works
Best wishes, Martin
I am using the database module for staff to request Photocopying/digital media/whatever, pretty much anything where they wanted a collection of people who worked off the same job queue to do something for them (which is a lot, if you work with teachers you would understand...)
Anywho, after one of the aides asked how they could find out whether something was added without having to check the database manually (which is a pretty clunky system anyways) I told them I would set up an RSS feed for them. Which of course led me to discover this problem.
I solved my issue using a batch file that nukes the xml file (stored in the $moodledata$\rss\data folder) and then copying in a new one (which is empty) with the same name. The file looked like this (single example):
copy *serverstructure*\moodledata\rss\empty.xml *serverstructure*\moodledata\rss\data\1.xml
I then set up a scheduled task to run this every 15 minutes momentarily before the cron job runs. This clears the xml file which is then populated again by the cron job. This works fine from what I can tell as the rss feed has no issue with adding stuff from the database, just removing the ones that have been deleted.
edit- far from a perfect solution of course, and it would not be suitable if you had many different rss feeds
Same problem in Moodle 2+
Following Ian's solution, I had success with this:
1) I went to "../moodledata/cache/rss/"
2) As I wanted to delete a forum post, I went to the folder "mod_forum"
3) I deleted all the content there, and voila!
I think this may not cause problems, nevertheless you may backup the content of the folder before erasing it (just in case...).
Thanks! I really hope they fix this, but your solution was good for now.