Opened 15 years ago
Closed 15 years ago
#1261 closed defect (bug) (fixed)
RSS Feeds Errors
Reported by: |
|
Owned by: |
|
---|---|---|---|
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)
Change History (14)
#4
@
15 years ago
- Keywords needs-testing removed
Both patches do the same thing with different methods, but I prefer method 2.
#5
@
15 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/
#6
@
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
@
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.
Ok, I jumped into the WordPress code and it still uses
CDATA
withent2ncr
as seen here and here. Attaching patch for all of the above which contains some coding standards anddo_actions
(couldn't reproduce 3(iii)).