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/

Comments

tangent’s picture

Version: master » 5.x-1.x-dev
Assigned: Unassigned » tangent
Status: Active » Reviewed & tested by the community
StatusFileSize
new1.1 KB

It'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.

tangent’s picture

StatusFileSize
new5.4 KB

Oops. That last patch uses /comment/node (I changed it from crss for my site). This patch uses the correct path.

tangent’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new1.1 KB

Sigh. 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 :-(

gnassar’s picture

Looks good so far! Thank you. I'll keep poking at it, seeing if I can get it to break.

tangent’s picture

Status: Needs review » Reviewed & tested by the community

Setting this as ready to commit since it's relatively risk free and seems to work for others than myself.

tangent’s picture

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

tangent’s picture

StatusFileSize
new917 bytes

Here'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.

tangent’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new1.59 KB

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

gnassar’s picture

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

gnassar’s picture

Ok, 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.

tangent’s picture

Status: Needs review » Fixed

Committed.

tangent’s picture

Status: Fixed » Closed (fixed)
gnassar’s picture

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

tangent’s picture

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