Closed (outdated)
Project:
Drupal core
Version:
6.x-dev
Component:
node.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 May 2006 at 04:59 UTC
Updated:
2 Mar 2016 at 22:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dries commentedI think $node->taxonomy is always supposed to be an array. Needs more investigation.
Comment #2
kscheirerI ran into this problem too when using the multichoice module (part of quiz module), and my first reaction was the same as hunmonk. Based on Dries' comment, I did some more investigating into the situation. I'm still pretty new to Drupal though, so anyone with the time/inclination please feel free to shed more light on this.
to reproduce this bug
So as hunmonk noted, in
taxonomy_rss_item()the $node being passed in is undefined (so $node->taxonomy is even more undefined :)This is being called from
node_feed()which first makes a list of 10 nodes where promote=1 and status=1.While processing these nodes, theres a call to
$item = node_invoke($item, 'view', $teaser, FALSE); //$teaser is TRUE by defaultwhich is then followed by a call to
$extra = node_invoke_nodeapi($item, 'rss item');which ends up invoking
taxonomy_nodeapi()which then callstaxonomy_rss_item().The problem with multichoice module was that in certain instances (like this one) with
$teaserbeing true,multichoice_view()returns nothing. So innode_feed(),$itemstarts off as defined, then undefined after$item = node_invoke($item, 'view', $teaser, FALSE), and then the call tonode_invoke_nodeapi()is with an undefined item, whichnode_invoke_nodeapi()happily passes along down the chain.So it seems to me there are 2 problems.
multichoice_view()with$teaser==truenode_invoke_nodeapi()function doesn't check to make sure there's an actual$nodeto invoke against, and will happily pass along the function call. This seems like a bigger problem, since any 3rd party module creator may not be aware of this requirement for implementing ahook_view()Attached is an extremely minor change to
node_invoke_nodeapi()to make sure the$nodeis defined. Should the fix be innode_feed()instead, to make sure the item returns something from thehook_view()request?Comment #3
hunmonk commentedComment #4
pasqualleThe quiz module is still for drupal 5. any other way, to test this?
by the way, multichoice_view was fixed http://drupal.org/node/146403
http://api.drupal.org/api/function/hook_view/6
so, for now I see it as a won't fix..
Comment #5
dpearcefl commentedIs this still a problem in current D6?
Comment #6
dpearcefl commented