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

scott.mclewin’s picture

Status: Active » Closed (fixed)

My 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.