I have written this slider module and works but when I active (install) it I get this error:
Notice: Undefined index: com_slider_node_list in field_info_max_weight() (line 797 of /Users/garethhall/Sites/local.dev/modules/field/field.info.inc)
Now I know it just a Notice error but I would like to resolve it.
Any help would be greatly appreciated.
I suspect the problem is in this part but I am not sure.
$body_instance['display']['com_slider_node_list'] = array(
'label' => 'hidden',
'type' => 'text_summary_or_trimmed',
);
Install file
<?php
// $Id$
/**
* @file
* Install file for Node Example module.
*/
/**
* Implements hook_install().
*
* - Add the body field.
* - Configure the body field.
* - Create image fields.
* - Create instances.
*/
function com_slider_install() {
// use get_t() to get the name of our localization function for translation
// during install, when t() is not available.
$t = get_t();
// Define the node type.
$com_slider = array(
'type' => 'com_slider',
'name' => $t('Slider Image'),
'base' => 'node_content',
'description' => $t('Images added to Slider Images will show on the slider block.'),
'body_label' => $t('Example Description')
);