Feed namespaces added with nodeapi are added multiple times

tangent - July 8, 2007 - 17:07
Project:Drupal
Version:6.x-dev
Component:node system
Category:bug report
Priority:normal
Assigned:tangent
Status:closed
Description

The node_feed() function allows modules to add namespaces to an RSS feed. However, they are added with array_merge in the loop while processing each node in the feed so the same namespace is added multiple times. The reason is that the namespaces array does not use keys so identical namespaces are added with unique integer keys. The attached bug fixes this. I highly recommend allowing this to backport to D5 as well.

I discovered this when I added the wfw namespace with changes to commentrss.module.

AttachmentSize
node_feed_0.patch1.13 KB

#1

tangent - July 15, 2007 - 05:07

Can someone please comment on this? It's a very minimal patch.

#2

Dries - July 16, 2007 - 07:41
Status:patch (code needs review)» patch (code needs work)

I've committed this to CVS HEAD. As this is a small API change, I suggest you document this in the upgrade instructions.

Thanks tangent.

#3

tangent - July 16, 2007 - 13:49
Status:patch (code needs work)» fixed

I've noted the change as a comment here, as that's the only ability I have. Hopefully that's the documentation you are referring to.
http://drupal.org/node/114774#comment-252463

#4

Anonymous - July 30, 2007 - 15:18
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.