Closed (outdated)
Project:
Content Construction Kit (CCK)
Version:
6.x-2.6
Component:
content.module
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
13 Feb 2007 at 23:41 UTC
Updated:
28 Aug 2017 at 21:22 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
moshe weitzman commentedi believe that happenned with http://drupal.org/node/107128 ... anyway, this is a dupe of http://drupal.org/node/89523. lets discuss there
Comment #2
leoklein commentedMoshe, are you sure this is a dupe of http://drupal.org/node/89523?
The problem here is that none of the CCK fields are showing up in the RSS Feed.
I noticed the problem when I wanted to created a Feed with Title and an Image Field.
Comment #3
aaron commentedI think this is still an issue? http://drupal.org/node/89523 is a duplicate of itself, though, and there's no other issue I can find for it. Although maybe at this point it's now a feature request rather than a bug, considering comments in http://drupal.org/node/107128
Comment #4
gordon commentedI have done a little work on this and I think I have it working.
Comment #5
yched commentedSidenotes :
- You left your db credentials in the patch (no secret passord disclosed :-) )
- The feature should already be in HEAD (CCK D6), D6 makes this easier on us - although I have to say I don't think I actually tested the thing :-)
About the patch itself :
- the
$body =& ...part doesn't seem that nice - can't we render the content first and then append it to either $node->body or $node->teaser ?- actually, I'm not sure I get the need for the 'rss item' op : the fields get rendered by the 'view' op anyway, right ? So isn't the customizable 'rss' context enough for what we're after ?
I know I spent a little time on the question of rss items back when we worked on http://drupal.org/node/107128, but that's about a year ago, and this has dimmed a bit in my head :-) Could you provide a short explanation on what the patch is doing and why it's needed ?
Comment #6
gordon commentedI have cleaned up the patch and removed the changes to the settings.php file.
1. Basically I have added a new context called RSS which allows you to set up which fields are going to be viewed on the the RSS feed.
2. I then added the 'rss item' to the nodeapi so that it will re-render the cck fields to only display the fields required and add this to the body or teaser. Also added call to fieldgroup_nodeapi() to update the groups.
3. Made the content_view() based more on context instead of working like the hold hook_view(). This is no longer used since cck is purely done via nodeapi now.
4. Add rss context to fieldgroup_nodeapi().
There is some problems with how the labels are rendered in the rss feed since there is no css to display them as required. So inline doesn't really work.
Comment #7
yched commented1 and 3 I get.
2 and 4 I don't - I'd expect 1 and 3 to be enough. What happens if you don't add the 'rss item' op ?
(OK, I guess running the patch in a debugger would make that clear to me, but since you did the job of actually writing it, you probably have the answer already ?)
Comment #8
gordon commentedThe main reason that you need the 'rss item' is because :-
1. node_feed() doesn't call drupal_render(), and CCK adds all the display to $node->content and thus is does get rendered into $node->teaser/$node->body
2. Since context has been added and rss being a context you need to reprocess the fields, and you just can remove the hidden ones since it may be rendered different to that of body/teaser. This is the same reason for fieldgroup_nodeapi()
Comment #9
gordon commentedAlso it is a pity that node_feed() doesn't pass a flag that says it is going to be added to a feed, then you could remove most of the rss item op, so you are only rendering the fields once.
Comment #10
yched commented- 'rss item' op : OK, got it, thx for the explanation :-) With that in mind I'll try to give a closer review asap.
- 'it is a pity that node_feed() doesn't pass a flag (...)' : yeah, that's precisely what we managed to get in D6 : http://drupal.org/node/152493 :-)
Comment #11
fuzzy_texan commentedSubscribing
Comment #12
yeeloon commentedwould there be a patch or an updated release for CCK 5x ?
Comment #13
reynolds23 commentedI implemented this patch, and it did pull in the fields that were previously being ignored, but it was pulling in all the other information twice. In my case I was trying to display the Location field for events, but I had to revert back to the original files because when I implemented this patch it pulled in entries that looks like this...
Start: Apr 17 2008 - 9:30am
End: Apr 17 2008 - 11:30am
Timezone: Etc/GMT-5
Participants will create a resume using Winway Resume and a formatted template. (Bring a 31/2 floppy disk or USB Drive and information to be included in your resume)
Start: Apr 17 2008 - 9:30am
End: Apr 17 2008 - 11:30am
Timezone: Etc/GMT-5
Participants will create a resume using Winway Resume and a formatted template. (Bring a 31/2 floppy disk or USB Drive and information to be included in your resume)
Location:
Main Library
Comment #14
reynolds23 commentedI figured out how to implement this patch, but I have information repeating. Does someone know which lines I need to alter or delete to keep information from repeating? Here's the RSS feed I'm working with. Info is only repeated in RSS feeds... http://www.cpl.org/?q=events/computer
Comment #15
Bèr Kessels commentedApplied and tested on a 5.x version with seven feeds, eight complex content types and tens of thousands of posts and users.
The patch does not break any existing settings, teaser lists, views and/or full node views.
It adds the content to the RSS items as expected.
Small downside, is that the already existing mis-design of the content-display shows up more obvious here. That mis-design is that the "labels" can only be configured 'for all contexts'. Say I want to show a lable in the fullnode, but not in teaser, the current interface does not allow this.
With this patch, as mentioned this problem becomes worse: we add a big load of *unstyled* (and therefore very ugly and confusing) HTML to the rss item.
But since that problem is certainly not introduced with this patch it should not hold this patch from going in. It is just something people should be aware off when rolling out.
This is only one test. enought to change status to tested and reviewed?
Bèr
Comment #16
Kuldip Gohil commentedi am in for getting new updates...
Comment #17
joncup commentedOk, just tested the patch. Appears fine at first glance, but with closer inspection, each field set to display is lumped together in one description tag, and all the special chars get badly mangled. Looks alright in the browser, but doesnt agregate well. Would like to see fields in thier own tags, and the char mangling is a problem too. Also, seems output doesn't respect the "Above or Inline" setting for labels.
Comment #18
yched commentedSorry for letting this fall out of our radar.
Still an issue in CCK 6, let's get it fixed here first. We need to look re-familiarize with gordon's patch in #6.
Although, as I pointed in #310846: no CCK Fields in RSS (before realizing it was a dupe of this one) :
"
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.
Besides, it looks like this part of node.module's node_feed() is odd :
Since D5, changing $node->teaser is not what hook_nodeapi('view') is supposed to do...
"
My 1st impression is that node_feed didn't get properly updated from 4.7...
@joncup : "each field set to display is lumped together in one description tag (...) Would like to see fields in thier own tags"
That's the intention here - having cck fields a separate xml tags in the item is a different feature - you might want to check #316107: CCK Fields as elements in Views with XML Data Document (Views2 / D6)
Comment #19
Anonymous (not verified) commentedI'm running around in circles trying to understand a problem I'm having with CCK fields never appearing in RSS feeds whether through views or Drupal's core feed features.
Does the RSS display setting for CCK fields have absolutely no effect right now because of the inconsistency yched explains in #18 above? (node_view uses the content property of the node object, but node_feed uses only the teaser or body.)
I'm trying to decide if this is a problem I've created for myself that I need to overcome or if this is a problem that others are having, so I should rely on the workaround of using contemplate until there's a solution to this issue?
Comment #20
heather commentedtagging this so i can follow responses to bangpound's question. ~ tnx
Comment #21
heather commentedCan anyone summarize the best solution to this problem- to get CCK fields to show in an RSS feed?
I'm making an RSS feed using views, and the custom CCK fields aren't showing up,
can I do this without using Contemplate? or is that the only solution at this stage for a production site?
Comment #22
nsyll commentedalso cck field doesn't appear in rss feed even you use content template module http://drupal.org/node/340540
Comment #23
Mac Clemmens commentedsubscribing
Comment #24
cardentey commentedsubscribing
Comment #25
capellicI am trying to do the same thing - add a CCK field (ImageField) to the output of the description element in the RSS feed. But this might be a Views problem?
Views doesn't seem to provide the ability to define fields for display of type "Feed". You get only these options: Full text, Title plus teaser, Title only & Use default RSS settings. I was hoping that the default would pick up the display fields settings from CCK - but no luck there.
I did some digging in the Views issue queue and this looks promising but it's a patch of the DEV version as of January 1, 2009
http://drupal.org/node/353090
Here's another issue in the Views queue dedicated to the problem:
http://drupal.org/node/316107
In any case, there doesn't seem to be a "stable" solution.
Comment #26
interestingaftermath commentedsubscribing. This is a huge problem.
Comment #27
Fintan Darragh commentedI've been encountering this problem with the latest releases of Views and CCK, too.
It doesn't seem to affect standard title/body nodes; only fields from CCK.
Comment #28
alanBrookland commentedSubscribing
Comment #29
pedropablo commentedJust confirming views dev version solves the problem and is able to use contemplate settings. That's more than enough for me!!
Comment #30
drewish commentedi think that using hook_nodeapi is the correct solution for feeds in D6.
Comment #31
yched commentedCore bug : #365183: node_feed() silently discards $node->content
Comment #32
tignux commentedThe patch in #6 works perfectly in D5.
The only problem I have is with the image size (I use imagecache). The feed display always the full size image.
Thanks gordon
Comment #33
Rameez commentedSubscribing
I've been encountering this problem with the latest releases of Views and CCK, too.
Comment #34
joncup commented