Skip to:

Opened 12 years ago

Closed 11 years ago

#4564 closed enhancement (duplicate)

Add syndication elements to RSS feeds

Reported by: r-a-y's profile r-a-y Owned by: r-a-y's profile r-a-y
Milestone: Priority: normal
Severity: normal Version: 1.2
Component: Activity Keywords: has-patch


Perhaps look at implementing the <ttl> element:

Twitter's RSS feeds use:

This caches feeds for 40 minutes before refreshing the feed.


There's also:


We should probably stick with one method or the other. FYI, WordPress uses the Syndication module (the latter option).

Attachments (1)

4564.01.patch (14.4 KB) - added by r-a-y 11 years ago.

Download all attachments as: .zip

Change History (28)

#1 @r-a-y
12 years ago

  • Summary changed from RSS feed does not update regularly to Add syndication elements to RSS feeds
  • Type changed from defect (bug) to enhancement

ubernaut: If you're reading, I've found that this is more of a browser / RSS client issue.

Firefox caches feeds for 60 minutes by default. If you do a hard refresh, the feed will refresh with the latest content.

I tested on Safari 5.1 and it works as expected; Safari 6, as you know, has removed RSS feeds entirely.


I'm changing this to an enhancement as using <ttl> is still valid as some clients use it:

However a lot of clients ignore it altogether.

I'm not sure which clients support the Syndication module; I did find an older ticket on WP - #WP3513 - saying that Outlook and IE7 respect this.


According to this article, <ttl> is used in RSS 2.0, while the Syndication module is used in RSS 1.0.

Therefore, I'm recommending that we implement <ttl>. Basically, copy Twitter! :)

Last edited 11 years ago by r-a-y (previous) (diff)

#2 @ubernaut
12 years ago

hi i am reading thanks for the info if i read that correctly the issue is that the formatting from the BP activity feed is causing safari and maybe other clients to update things irregularly. hope the way I'm commenting here is acceptable!

#3 @r-a-y
12 years ago

It's fine to comment here!

What I'm saying is this might not be a BuddyPress problem, but rather with the RSS client you are using.

Do you experience the same problem with WordPress feeds? You can try by loading the WP post feed from your site. Then, post a new blog post. Next, go back to the post feed and refresh it. If the post feed doesn't refresh, then it's a problem with the RSS client.

#4 @ubernaut
12 years ago

nope they act normally i have my feeds set up to update every 30 minutes and bp feed is the only one i know for sure doesn't seem to update every time. normal wp feeds update eveyrtime.

#5 @r-a-y
12 years ago

Thanks for confirming. What is the RSS client you're using again?

Do you manually set your client to update every 30 minutes? Do you manually refresh your feeds or do you wait for your client to refresh the feed?

Can you try using this small plugin to see if it fixes your problems?

#6 @ubernaut
12 years ago

safari 517 i think its a setting in the preferences i don't think there is any way to force a refresh other by quitting and restarting the browser so yeah i generally just see the updates every half hour not sure how to wrap that php into an actual plugin.

#7 @ubernaut
12 years ago

it definitely works better but i don't think its 100% in sync with the regular feed maybe 80 or 90% of the time it is so a vast improvement at least.

#8 @r-a-y
12 years ago

Right now, the plugin is setup to refresh every half hour.

You can change this to every 15 minutes by changing this part of the code:
<?php echo apply_filters( 'bp_rss_update_frequency', '2' ); ?>


<?php echo apply_filters( 'bp_rss_update_frequency', '4' ); ?>

Or something higher if your site has tons of updates.

Let me know if that works.

If it does, I'll add syndication support for RSS feeds into BP 1.7.

#9 @ubernaut
12 years ago

well my reader just checks every 30 minutes and almost every time they are synched up but not always what is the frequency of the regular wp feed or doesn't that same logic apply to wp?

#10 @r-a-y
12 years ago

WP updates their blog RSS feeds every hour by default.

One thing to keep in mind is blog posts are rarely published, so that's why the default is hourly and you're not experiencing any issues.

On an active BP site (like yours), activity updates can be made at a far, more rapid pace.

That's why I say to make the change above if your BP site has more frequent activity updates and to see if that makes a difference in Safari.

Safari might obey those rules or it might not; that's what I'm trying to find out.

#11 @ubernaut
12 years ago

ok i guess i only half aware of what the issue actually is so i'll just go ahead and make that change and report back the results but just to be clear the way I'm testing this is compare the wp feed for the site to the bp feed for activity so things like posts should show up in both feeds and i could swear the regular wp feed updates every time safari checks (which is every 30 minutes).

#12 @ubernaut
12 years ago

still not fully synched up very close but still differences from time to time

edt: i think actually it was more in sync at the less frequent updates but its hard to say for sure :/

Last edited 12 years ago by ubernaut (previous) (diff)

#13 @ubernaut
12 years ago

ok this is pretty strange and I'm not sure how this could be the case but we recently switched hosts and ever since we switched it seems to be perfectly in sync now :/

#14 @DJPaul
11 years ago

  • Keywords reporter-feedback added

What's the consensus? It was a server problem, and nothing to fix in BP?

#15 @ubernaut
11 years ago

i think there was definitely a problem before and on the old server (dreamhost) the fix was better but not perfect on my new server it is perfect. so yes i would say this is a needed fix but idk exactly what the problem was so…

Last edited 11 years ago by ubernaut (previous) (diff)

#16 @ubernaut
11 years ago

ok so WP 3.5 and/or BP 1.6.2 seems to have broken this fix.

#17 @DJPaul
11 years ago

  • Keywords reporter-feedback removed
  • Milestone changed from Awaiting Review to Future Release

Moving to FR to track down in future if anyone recreates.

11 years ago

#18 @r-a-y
11 years ago

  • Keywords has-patch added

Attached patch adds the Syndication and Slash modules so BP RSS feeds are inline with WP's.

ubernaut: This makes BP's RSS feeds almost identical to WP's. Give it a test and see what happens.

#19 @ubernaut
11 years ago

not sure how to apply the patch. should i make these changes to the existing 1.6.4 files or 1.7 or is there a better way? thanks!

#20 @r-a-y
11 years ago

  • Milestone changed from Future Release to 1.8
  • Owner set to r-a-y
  • Status changed from new to assigned

Apply the patch to whatever version of BP you're using; it should apply cleanly on both 1.6.4 and 1.7.

Moving to 1.8 as this patch is non-destructive.

#21 @ubernaut
11 years ago

so being a little paranoid about the sheer number of edits and my horrendous typing skills i figured out how to run a patch command/file through terminal to facilitate this test. the command did return some errors but i think maybe i can ignore these? please let me know if i need to do this manually or if it looks like these offset errors are safe to ignore. From terminal:

USS-Voyager-NCC-74656:desktop ubernaut$ patch -p1 < 4564.01.patch
patching file feeds/bp-activity-favorites-feed.php
Hunk #1 succeeded at 20 (offset 1 line).
Hunk #2 FAILED at 34.
Hunk #3 succeeded at 56 (offset 1 line).
Hunk #4 succeeded at 63 (offset 1 line).
1 out of 4 hunks FAILED -- saving rejects to file feeds/bp-activity-favorites-feed.php.rej
patching file feeds/bp-activity-friends-feed.php
Hunk #1 succeeded at 20 (offset 1 line).
Hunk #2 FAILED at 34.
Hunk #3 succeeded at 48 (offset 1 line).
1 out of 3 hunks FAILED -- saving rejects to file feeds/bp-activity-friends-feed.php.rej
patching file feeds/bp-activity-group-feed.php
Hunk #1 succeeded at 20 (offset 1 line).
Hunk #2 FAILED at 34.
Hunk #3 succeeded at 49 (offset 1 line).
1 out of 3 hunks FAILED -- saving rejects to file feeds/bp-activity-group-feed.php.rej
patching file feeds/bp-activity-mentions-feed.php
Hunk #1 succeeded at 20 (offset 1 line).
Hunk #2 FAILED at 35.
Hunk #3 succeeded at 51 (offset 1 line).
1 out of 3 hunks FAILED -- saving rejects to file feeds/bp-activity-mentions-feed.php.rej
patching file feeds/bp-activity-mygroups-feed.php
Hunk #1 succeeded at 20 (offset 1 line).
Hunk #2 FAILED at 35.
Hunk #3 succeeded at 55 (offset 1 line).
1 out of 3 hunks FAILED -- saving rejects to file feeds/bp-activity-mygroups-feed.php.rej
patching file feeds/bp-activity-personal-feed.php
Hunk #1 succeeded at 20 (offset 1 line).
Hunk #2 FAILED at 34.
Hunk #3 succeeded at 50 (offset 1 line).
1 out of 3 hunks FAILED -- saving rejects to file feeds/bp-activity-personal-feed.php.rej
patching file feeds/bp-activity-sitewide-feed.php
Hunk #1 succeeded at 20 (offset 1 line).
Hunk #2 FAILED at 34.
Hunk #3 succeeded at 49 (offset 1 line).
1 out of 3 hunks FAILED -- saving rejects to file feeds/bp-activity-sitewide-feed.php.rej

thanks again r-a-y!!!

Last edited 11 years ago by ubernaut (previous) (diff)

#22 @ubernaut
11 years ago

so i made the changes to the 1.7.2 versions of the files and the patch ran without any messages. i have confirmed the updated files do match your changes but the feeds still aren't updating correctly. i'll keep my eye on it and see if i can notice any differences. the hot fix worked like a charm under 1.6 and wp 3.4 so I'm not sure what else to add for now. thanks for working on it.

#23 @r-a-y
11 years ago

The patch adds syndication functionality, but the default update frequency is set to 2 (or 30 minutes).

In the hotfix, you may have set the default value to something a little higher like 4 as mentioned in comment:8.

To apply that same value, add the following snippet in bp-custom.php:

add_filter( 'bp_rss_update_frequency', create_function( '', 'return 4;' ) );

Let me know if that helps.

#24 @ubernaut
11 years ago

ok have added the comment not sure if this info is useful to you or not but before adding the line to bp-custom at least i saw no updates at all to the activity feed since i patched those files (2 days ago).

#25 @ubernaut
11 years ago

ok it appears to be updating now but its still doing the same thing and i think i might be able to shed a little more light on the situation at this point. one thing i have noticed (at least recently) is that every time the feed updates it has exactly 20 entries. i'll keep my eye on things and see if i can notice anything else but it appears to be doing the same thing as before the patch.

#26 @ubernaut
11 years ago

ok forget what i just said just saw an update with 16 entries funny thing is that none of the entries correlate with the timing of the regular post roll i think something is triggering the rss updates every so often but i can't for the life of me seem to ascertain what it is and there definitely gaps in the rss data. it does seem like the added line has improved things to some degree.

Last edited 11 years ago by ubernaut (previous) (diff)

#27 @boonebgorges
11 years ago

  • Milestone 1.8 deleted
  • Resolution set to duplicate
  • Status changed from assigned to closed

Thanks for all the work and testing on this ticket. I'm going to mark it as a duplicate of #5020 and move discussion there, since the changes in #5020 include these improvements.

Note: See TracTickets for help on using tickets.