Skip to:
Content

bbPress.org

Opened 8 years ago

Closed 7 years ago

Last modified 6 years ago

#3001 closed enhancement (fixed)

RSS feed pubDate in Topics feed using possibly wrong value for pubDate

Reported by: otto42's profile Otto42 Owned by:
Milestone: 2.6 Priority: normal
Severity: normal Version:
Component: API - Feeds Keywords:
Cc: espellcaste@…, pavelevap@…

Description

The "Topics" feed provides the first post in each given topic for whatever set of topics. These are ordered by the last_active_time, which makes sense because then the order will match the order they are displayed as in the forums themselves, for the most part.

Problem: The "pubDate" field for each item uses this last active time instead of the normal post_time. In some RSS readers, this has been reported to cause a "duplicate post" to appear whenever a reply is made to a topic. This duplicate posts consists only of the first post in the topic (the topic starter) and does not contain the reply. That part is expected, because the topics feed only contains those first-posts by design.

Given example for a reader that does this is Outlook. I have been unable to reproduce the behavior.

Nevertheless, I made a quick-fix to change the value in pubDate to be determined by the get_post_date() function instead of using the last_active_time meta value, and the problem was reported as provisionally solved.

So, it appears that at least in some readers, updating the pubDate, without changing the GUID or anything else notable about the post, will cause a duplicated post to be produced in the reader.

I suggest that bbp_display_topics_feed_rss2() be altered to use the get_post_date function instead of get_post_meta( bbp_get_topic_id(), '_bbp_last_active_time', true): https://bbpress.trac.wordpress.org/browser/trunk/src/includes/topics/functions.php#L3994

This also makes sense in that the <item> is describing a unique post here, and updating the pubDate on it when that post really it has not been updated is probably incorrect behavior.

If we want to keep the last_active_time to show when the topic was updated, then a better choice might be <dc:modified> instead, which is a generally supported addition by Dublin Core. While WordPress itself does not use dc:modified, and I'm unaware of any feedreaders that do, at least that data will be available to anybody who happens to need it.

Since the items do change order as they are sorted by last active time, then this brings up the issue that the items might be listed in the feed out of order according to the post_date. This is true, but also somewhat irrelevant, as I'm unaware of any feed reader that cares what order items are actually in, but now I'm aware of at least one feed reader that might care when things like pubDate change.

Relevant discussion from #bbPress:
https://wordpress.slack.com/archives/bbpress/p1474654895000087

Change History (6)

#1 @espellcaste
8 years ago

  • Cc espellcaste@… added
  • Keywords needs-patch dev-feedback 2nd-opinion added

Interesting!

I'm not a Outlook user, so I never noticed this. I wonder if there is unseen drawbacks. Could you share what you changed or a patch for better testing?

#2 @netweb
8 years ago

Here's the current #meta commit workaround: https://meta.trac.wordpress.org/changeset/4121

#3 @netweb
8 years ago

  • Milestone changed from Awaiting Review to Under Consideration

The flux capacitor was changed in r6318 #3066

@thebrandonallen, as you've just recently had the Delorean up 88mph, would you mind taking a look at this please?

#4 @pavelevap
7 years ago

  • Cc pavelevap@… added

I noticed this issue too, feed with latest topics is automatically changed with date of latest reply, it should use published date of topic, I guess.

What is the right URL for latest topics feed? I noticed https://bbpress.org/topics/feed/ (link from homepage), but there is no content in this feed? And it also does not work on my website. I was able to find it here: https://bbpress.org/feed/?post_type=topic (but it is not so pretty URL).

#5 @johnjamesjacoby
7 years ago

  • Keywords needs-patch dev-feedback 2nd-opinion removed
  • Milestone changed from Under Consideration to 2.6
  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r6318, for 2.6.

#6 @johnjamesjacoby
6 years ago

Assigning all closed & unassigned tickets in the 2.6 milestone to myself.

Note: See TracTickets for help on using tickets.