Closed (fixed)
Project:
Fileshare
Version:
5.x-1.x-dev
Component:
Module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Aug 2007 at 04:46 UTC
Updated:
28 Aug 2007 at 05:14 UTC
There are two errors in the way the fileshare node type is declared that cause problems in Drupal 5.
First, in fileshare_node_info() the 'module' element of the array is missing
function fileshare_node_info() {
return array('fileshare' => array('name' => t('fileshare'), 'base' => 'fileshare');
}
should be
function fileshare_node_info() {
return array('fileshare' => array('name' => t('fileshare'), 'base' => 'fileshare', 'module' => 'fileshare'));
}
Without that 'module' key the hook triggers deep within the node module have no clue that "fileshare_load()" and "fileshare_view()" should be called, so default processing as if this were a generic node happens.
Second, within fileshare_view() there is significant error - hook_view() is supposed to return the $node that has been manipulated. That's not happening here, so again within the node module code $node is being set to NULL when fileshare_view() is called, which is not good.
Comments
Comment #1
scott.mclewin commentedMy error - I was pulling from and looking at HEAD errantly as I was updating from Drupal 4.7 to Drupal 5. My mistake, these are not problems at all.