Originally created by: roggan87
Hi!
Overall I really like the new interface of SourceForge :) I've recently discovered something I'd consider a bug. Please correct me if I'm wrong.
I've installed the "blog tool" on our project. The intention is to also use the RSS feed to fetch the blog posts to our website. The problem is that if I edit posts or delete them, it doesn't affect the RSS feed. Is that because of the design of RSS feeds, or simply because that feature is not yet implemented?
Thanks,
Robert
Git: 0e14502c
Git: 101db490
Git: 1f103b73
Git: 262f2057
Git: b33c4ffc
Git: f016c798
Tickets: #7638
Originally by: martinprikryl
I also suffer from this bug. Any news on this?
Originally by: martinprikryl
Bump. Any news on this? It's really a pain not to be able to amend RSS feed contents.
I'm not able to find the code where the creation of blog post also makes the entry into the rss feeds.
Diff:
@Dave, I made a change, and it seems to work..
https://forge-allura.apache.org/u/pranav/allura/ci/7bf41606e782c2a4a9387f4880d5ea8607df7ed8/
Glad you found the spot. This does work to some extent, but it creates new entries for each revision. I am not sure if that's what we want or not. It lets people subscribed to the feed see all the changes to a blog post, and in some cases that might be useful but I think in most cases people just want the final version in the feed. They don't want people to see the earlier versions.
To do that, I think the
Feed.post
method will have to be refactored so to create a newFeed.update
method. Set it up so that most of the logic for the permission checks and values are shared (perhaps with a new helper method). And thenpost
would create a new item andupdate
would update an existing one (fetch it with the "ref_id" field probably). Then in the blog code, you can callFeed.post
for new items andFeed.update
for existing ones.Also, if you save something as a draft, and then edit it and keep it as a draft, it is posted to the rss feed but it should never do that if its a draft.
And an additional thing is that the original description requests that the feed items are removed if a blog post is deleted.
@Dave, review the branch pr/4153. I made update function for the chenge. It seems to work as desired.
A better way to write
if Feed.has_access(artifact) == False:
isif not Feed.has_access(artifact)
. Checking forFalse
explicitly isn't normally needed (and when you do, people typically useis False
instead of== False
).Updating is looking just right.
Can you delete the Feed item if the post status changes to "draft", or is deleted?
Thanks.
Any updates on this ticket? I think you're pretty close to having it complete.
Hey Pranav,
I was doing a little more testing and noticed that if you delete a blog post, it doesn't remove it from the RSS feed. Would you like to look into that? I think we overlooked that since we were focusing mostly on editing and changing the status of a blog post.
Thanks, merged https://forge-allura.apache.org/u/pranav/allura/ci/fd92c8acd2438ddb288c5313ceda40259acda122/