I have set up a custom content type using CCK which I would like to use in an RSS feed. Under Display Fields->Advanced->RSS I have selected how I want the fields to show up, yet they do not appear in the RSS feed. Are the RSS feed settings under Display Fields->Advanced supposed to do anything? Could I be missing something to make them work?

(I am using Drupal 6.4.)

Comments

pdb’s picture

Nothing?

darrenmothersele’s picture

I also experience this, but when using Views RSS. There is an issue in Views here: #316107: CCK Fields as elements in Views with XML Data Document, but this may be a CCK issue.

I believe the CCK fields should be adding themselves by responding to node_api "rss item" - but is this not the case?

In Views RSS there is a call to modules for hook_node_api, like this:

    // Allow modules to add additional item fields and/or modify $item
    $extra = node_invoke_nodeapi($item, 'rss item');

, but nothing gets added for CCK fields.

yched’s picture

Title: CCK Fields in RSS » no CCK Fields in RSS
Category: support » bug

#316107: CCK Fields as elements in Views with XML Data Document is a whole different issue, dealing with adding additional xml fields in the generated feed items.

The issue here is that cck fields are not rendered in the <description> element of RSS items, as it usually was.
This is because what we do in nodeapi('view') is add a render structure to $node->content - which, AFAIK, is what nodeapi('view') implementations are supposed to do (http://api.drupal.org/api/function/hook_nodeapi/6).

However, unlike node_view(), node_feed() completely neglects $node->content and only considers what's in $node->[body|teaser], thus dropping all nodeapi additions (not only CCK fields). I'd be tempted to say it's a core bug, but I might very well be overlooking something.

Opinions, anyone ?

yched’s picture

Status: Active » Closed (duplicate)

Besides, it looks like this part of node.module's node_feed() is odd :

// Allow modules to change $node->teaser before viewing.
node_invoke_nodeapi($item, 'view', $teaser, FALSE);

Since D5, changing $node->teaser is not what hook_nodeapi('view') is supposed to be doing...

Well, actually this is a dupe of #118833: Fields doesn't appear in RSS feed, that we overlooked for quite long now....
However, I'm a little puzzled by the node_feed() inconsistency pointed above.

eaton’s picture

Agreed, yched. The problem is that there is still remnant Drupal 4.7 code sitting in node_feed(), ignoring $node->content entirely. The issue has been fixed in the latest dev releases of Views but anything using node_feed() still has the problem. #365183: node_feed() silently discards $node->content has a fix for it in core for both D6 and D7.

yched’s picture

Yay. Closing the current CCK issue, then.

Thks Eaton !