Closed (fixed)
Project:
Comment RSS
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
25 May 2007 at 20:46 UTC
Updated:
16 Jul 2007 at 03:09 UTC
Jump to comment: Most recent file
The element is AFAIK the most popular way to link comments feeds back to the originating pages (nodes, in Drupal's case, of course).
See:
http://developer.mozilla.org/en/docs/RSS:Article:Why_Well-Formed_Web_RSS...
http://wellformedweb.org/news/wfw_namespace_elements/
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | commentrss.module_0.patch | 1.59 KB | tangent |
| #7 | wfw.patch | 917 bytes | tangent |
| #3 | commentrss.module_1.diff | 1.1 KB | tangent |
| #2 | commentrss.module_0.diff | 5.4 KB | tangent |
| #1 | commentrss.module.diff | 1.1 KB | tangent |
Comments
Comment #1
tangent commentedIt's your lucky day. I've already added this feature for my site. Here's the patch.
Note that the name-space is added to each "commentRss" element because there is no way of adding the name-space to the node feed, as far as I can see. Hopefully this will be less of an issue in the future once feeds are just another view.
Comment #2
tangent commentedOops. That last patch uses /comment/node (I changed it from crss for my site). This patch uses the correct path.
Comment #3
tangent commentedSigh. Another patch crept into that last one. This is my last try. Sorry for all that. Setting to "needs review" given my track record with this one :-(
Comment #4
gnassar commentedLooks good so far! Thank you. I'll keep poking at it, seeing if I can get it to break.
Comment #5
tangent commentedSetting this as ready to commit since it's relatively risk free and seems to work for others than myself.
Comment #6
tangent commentedUpon re-examining node_feed() I realized it is possible to add the wfw name-space to the feed instead of to each element. Unfortunately, there is a bug in the node_feed() implementation. Perhaps it went undiscovered since no one has tried to use it before.
I've submitted a patch to fix that in issue 157709 so until that bug is fixed I'll leave this patch as is.
Comment #7
tangent commentedHere's the patch to add the wfw:commentRss element if were fixed. Note that that patch is against 6.x though and would have to be backported before this patch would work with 5.x.
I'm merely adding this here so I won't lose it locally.
Comment #8
tangent commentedThe patch in comment #3 causes wfw:commentRss elements to be added to comment node feeds (e.g., crss/node/1) also. This patch corrects that. Please test it.
Comment #9
gnassar commentedStill checking on this patch. Sorry I hadn't replied yet; I need to re-down the clean module and re-patch, I think. Reason being, for some reason I'm not getting commentRss elements in the comments feed in the old patch either. Of course, I don't have to tell you that that doesn't make any sense -- after all, the comment feed is clearly "rss item" content, and it calls invoke_nodeapi, so comment module's own nodeapi should be adding the commentRss element again. It was clear from my look that the problem you state should exist with the old patch -- yet I'm not seeing it occur, and I have no idea why. I feel like I must be missing something obvious, but I don't know what.
Comment #10
gnassar commentedOk, sorry. I get the problem now. The CommentRSS element is appearing only in the teaser item in the comment feed, right? I didn't see it in my build because I have turned off that teaser item.
The changed patch seems to work fine when I re-enable the teaser item. Of course, if the teaser item gets removed completely instead of made optional, the old patch would work just fine.
So I guess if a module creates a node, and it also has a nodeapi() callback, that module's nodeapi() only runs for those nodes it didn't create itself? That seems to be how it's operating, unless I'm missing something. I didn't realize that was the case.
Comment #11
tangent commentedCommitted.
Comment #12
tangent commentedComment #13
gnassar commentedAs I noted, the commentRss element only appears in the node teaser with the patch in #3. As the node teaser has been permanently removed, the patch in #8 is unnecessary, and #3 should apply.
Seeing as the "comment" argument could theoretically be used for something more general than the comment *feed*, it would probably be a good idea to just use what was needed.
Comment #14
tangent commentedI see your point. I'm not sure why I thought the element was being added to all comments. I guess the node entry in there threw me. Thanks for re-iterating.