/posts.rss only shows 3 entries

(Sam Clay) #1

I just migrated to Discouse from Get Satisfaction and I’m using the posts.rss feed to populate a dashboard for all of my users. All went fine yesterday when the posts.rss feed had dozens of entries, but today I’ve come to find only three entries.



I couldn’t find a setting for controlling the number of posts. I also checked the source code on github and it shows 50 entries. And finally I searched this forum for clues.

When I check the latest.rss feed, I see all of the topics, but what I really want are the posts (replies).

(Sam Clay) #2

I’ve been adding posts so the number has climbed up to 6 (as of now) but you’ll notice that it’s only 6. Shouldn’t it be 50? Is posts.rss cleared out at midnight?


Apparently, /posts.rss doesn’t guarantee 50 results. It looks at the last 50 posts, and filter out whatever that’s not visible to the viewer (i.e. private messages, deleted, private category, etc).

I think the benefit of this implementation is consistency: users with different access levels will get results from the same subset of posts.

I did notice posts.rss takes a before parameter for pagination, which you could use to fetch more results. e.g. before=100 will return visible posts from post #100 ~ #51

(Sam Clay) #4

But all of the posts are public. In fact, yesterday posts.rss was showing more posts. They just dropped off the list today. They should be visible at least as they are public and nothing changed overnight.


This could be because of new private messages (which are essentially private posts in Discourse’s term), or newer posts that were deleted. Say all of the latest 50 posts on your forum are private messages, posts.rss would probably return an empty list.

Check out the following three examples from your forum:


They varies in length because the number of public posts within their ranges differ.

(Biscuit) #6

Are the numbers (eg: before=29172) POST ID numbers?

Is there a URL parameter to show only the last 5 topics created?

Are there any other parameters like “before” that you know about?