I have implemented a hook_node_info()
as follows:
function mymodule2_node_info(){
return array(
'mynode1' => array(
'name' => 'MyNode1',
'base' => 'mynode1',
'description' => t('A Description of MyNode1'),
'has_title' => TRUE,
'title_label' => 'Title',
),
);
}
I'd specified the 'base' property as 'mynode1', So I would expect that an implementation of mynode1_view()
would work when this node is viewed.
function mynode1_view($node, $view_mode){
}
But I get the error messages instead:
Notice: Trying to get property of non-object in node_build_content() (line 1413 of
C:\wamp\vhosts\mydrupal72\modules\node\node.module).
EntityMalformedException: Missing bundle property on entity of type node. in
entity_extract_ids() (line 7880 of C:\wamp\vhosts\mydrupal72\includes\common.inc).