Skip to:
Content

bbPress.org

Opened 15 years ago

Closed 15 years ago

#1261 closed defect (bug) (fixed)

RSS Feeds Errors

Reported by: gautamgupta's profile GautamGupta Owned by: chrishajer's profile chrishajer
Milestone: 1.0.3 Priority: high
Severity: major Version: 1.0.2
Component: Front-end Keywords: has-patch
Cc:

Description

Combined #1209, #1181 and #1260.

1) #1181: There's an issue with RSS feeds not validating. The problem appears to stem from » in the titles (rss.php) so I swapped them all with ::. It now validates. It did work fine in Safari, but Firefox and IE threw up errors. Example

2) #1260: According to this page, the TextInput field (used for search) should not be used as most aggregators ignore it. Fewer than one percent of surveyed RSS feeds included the element. The only aggregators known to support it are BottomFeeder and Liferea.

3) #1209: (i) The favorites URL (e.g. rss.php?profile=1) was interpreted as unformatted XML -- there was an error message and the entire markup was displayed. I eventually discovered this was caused by an <a> tag inside the channel's <link> tag. By changing the bb_get_profile_link call to a get_user_profile_link call in rss.php I got the URL without the tag, and the feed was interpreted correctly. Incidentally, I also noticed a couple other things about the script that seemed a bit off:

(ii) There are a number of calls to die() if the feed turns out to be empty -- seems like either an empty feed or an error page would be preferable to this silent failure.

(iii) The bb_send_304() call doesn't take into account that the feed itself may have changed recently, e.g. threads added to a "favorites" list won't show up until activity on one of the threads causes the feed to be refreshed. (Which is not totally illogical, but it can be confusing for the user to add a favorite, refresh the feed, and still not see the newly-added thread.)

Attachments (4)

1261-method1.diff (11.8 KB) - added by GautamGupta 15 years ago.
Method 1
1261-method2.diff (10.2 KB) - added by GautamGupta 15 years ago.
Method 2
local.diff (13.6 KB) - added by chrishajer 15 years ago.
Here's a svn diff of my local installation after applying 1261-method2.diff
1261-final.patch (4.0 KB) - added by GautamGupta 15 years ago.
Final patch to fix this ticket

Download all attachments as: .zip

Change History (14)

#1 @GautamGupta
15 years ago

Ok, I jumped into the WordPress code and it still uses CDATA with ent2ncr as seen here and here. Attaching patch for all of the above which contains some coding standards and do_actions (couldn't reproduce 3(iii)).

#2 @GautamGupta
15 years ago

Now, comments feed doesn't use CDATA - see here and uses esc_html instead of convert_chars - see here, but also has content:encoded tag. So which method should we go with?

@GautamGupta
15 years ago

Method 1

@GautamGupta
15 years ago

Method 2

#3 @GautamGupta
15 years ago

  • Keywords has-patch needs-testing added

#4 @GautamGupta
15 years ago

  • Keywords needs-testing removed

Both patches do the same thing with different methods, but I prefer method 2.

#5 @chrishajer
15 years ago

I applied method 2 to a trunk installation and I still have an invalid feed.

  1. Description:
<description><p>Will the RSS feed validate?
</p></description>

Validator complains "column 16: Undefined description element: p"

  1. There are still CDATA blocks in there. Should there be?
  1. textInput is still being used.

You can see the trunk installation here, with the "method 2" patch applied.
http://bbpress.chrishajer.com/trunk/

#6 @GautamGupta
15 years ago

I think you didn't apply the patch correctly or didn't upload all the patched files. As you can see here, the patch also modifies bb-templates/kakumei/rss2.php which contains some necessary fixes like removal of TextInput, addind content:encoded field etc. This is how WordPress does it, first adds description without CDATA and then content:encoded field with CDATA.

Try patching your install again.

#7 @chrishajer
15 years ago

These are all the files that were modified:

M    trunk/bb-templates/kakumei/rss2.php
M    trunk/bb-includes/defaults.bb-filters.php
M    trunk/bb-includes/functions.bb-template.php
M    trunk/rss.php

I did a svn diff of my local installation and will attach that. Maybe you can see what went wrong? I didn't do anything different with this patch than any other, and all the hunks were applied successfully.

@chrishajer
15 years ago

Here's a svn diff of my local installation after applying 1261-method2.diff

#8 @GautamGupta
15 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [2420]) RSS feed validation code changes. (You will need to update any

custom theme.) Fixes #1181. Props sambauers, GautamGupta

#9 @GautamGupta
15 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Feed reader's are not displaying the feed correctly (see bbPress.org's feed in FeedDemon and you we'll see what's the error), so I am attaching a final patch which would fix this problem.

@GautamGupta
15 years ago

Final patch to fix this ticket

#10 @chrishajer
15 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [2430]) Fix feed further. Fixes #1261 Props GautamGupta

Note: See TracTickets for help on using tickets.