Opened 3 years ago
Closed 3 years ago
#1261 closed defect (fixed)
RSS Feeds Errors
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | high | Milestone: | 1.0.3 |
| Component: | Front-end | Version: | 1.0.2 |
| Severity: | major | 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)
Change History (14)
comment:1
GautamGupta — 3 years ago
comment:2
GautamGupta — 3 years ago
comment:3
GautamGupta — 3 years ago
- Keywords has-patch needs-testing added
comment:4
GautamGupta — 3 years ago
- Keywords needs-testing removed
Both patches do the same thing with different methods, but I prefer method 2.
comment:5
chrishajer — 3 years ago
I applied method 2 to a trunk installation and I still have an invalid feed.
- Description:
<description><p>Will the RSS feed validate? </p></description>
Validator complains "column 16: Undefined description element: p"
- There are still CDATA blocks in there. Should there be?
- textInput is still being used.
You can see the trunk installation here, with the "method 2" patch applied.
http://bbpress.chrishajer.com/trunk/
comment:6
GautamGupta — 3 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.
comment:7
chrishajer — 3 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 — 3 years ago
Here's a svn diff of my local installation after applying 1261-method2.diff
comment:8
GautamGupta — 3 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?
comment:9
GautamGupta — 3 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.
comment:10
chrishajer — 3 years ago
- Resolution set to fixed
- Status changed from reopened to closed
(In [2430]) Fix feed further. Fixes #1261 Props GautamGupta?

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)).