I created a view to list all the simplenews nodes for my site in a table. It displays Title, Post date, an edit link, Newsletter Category, Sent Status, Subscribers count, and a send newsletter link.
When I save the view or view the view it gives the following notice:
Notice: Undefined index: entity type in views_handler_field_entity->init() (line 38 of /home/MYROOTSITE/public_html/MYSUBSITE/sites/all/modules/views/handlers/views_handler_field_entity.inc).
Everything still seems to work, but it displays that error, so the priority may be minor instead of normal.
Below is the export from the view. Please let me know what other information you need.
$view = new view;
$view->name = 'newsletter_list';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'newsletter list';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'Newsletters';
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['query']['options']['query_comment'] = FALSE;
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'none';
$handler->display->display_options['style_plugin'] = 'table';
$handler->display->display_options['style_options']['columns'] = array(
'created' => 'created',
'title' => 'title',
'field_simplenews_term' => 'field_simplenews_term',
'status' => 'status',
'sent_subscriber_count' => 'sent_subscriber_count',
'send' => 'send',
);
$handler->display->display_options['style_options']['default'] = 'created';
$handler->display->display_options['style_options']['info'] = array(
'created' => array(
'sortable' => 1,
'default_sort_order' => 'desc',
'align' => '',
'separator' => '',
'empty_column' => 0,
),
'title' => array(
'sortable' => 1,
'default_sort_order' => 'asc',
'align' => '',
'separator' => '',
'empty_column' => 0,
),
'field_simplenews_term' => array(
'sortable' => 1,
'default_sort_order' => 'asc',
'align' => '',
'separator' => '',
'empty_column' => 0,
),
'status' => array(
'sortable' => 1,
'default_sort_order' => 'asc',
'align' => '',
'separator' => '',
'empty_column' => 0,
),
'sent_subscriber_count' => array(
'sortable' => 1,
'default_sort_order' => 'asc',
'align' => '',
'separator' => '',
'empty_column' => 0,
),
'send' => array(
'align' => '',
'separator' => '',
'empty_column' => 0,
),
);
$handler->display->display_options['style_options']['override'] = 1;
$handler->display->display_options['style_options']['sticky'] = 0;
$handler->display->display_options['style_options']['empty_table'] = 0;
/* Field: Content: Edit link */
$handler->display->display_options['fields']['edit_node']['id'] = 'edit_node';
$handler->display->display_options['fields']['edit_node']['table'] = 'views_entity_node';
$handler->display->display_options['fields']['edit_node']['field'] = 'edit_node';
$handler->display->display_options['fields']['edit_node']['label'] = 'Edit';
$handler->display->display_options['fields']['edit_node']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['edit_node']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['edit_node']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['edit_node']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['edit_node']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['edit_node']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['edit_node']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['edit_node']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['edit_node']['alter']['more_link'] = 0;
$handler->display->display_options['fields']['edit_node']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['edit_node']['alter']['trim'] = 0;
$handler->display->display_options['fields']['edit_node']['alter']['html'] = 0;
$handler->display->display_options['fields']['edit_node']['element_label_colon'] = 1;
$handler->display->display_options['fields']['edit_node']['element_default_classes'] = 1;
$handler->display->display_options['fields']['edit_node']['hide_empty'] = 0;
$handler->display->display_options['fields']['edit_node']['empty_zero'] = 0;
$handler->display->display_options['fields']['edit_node']['hide_alter_empty'] = 1;
/* Field: Content: Post date */
$handler->display->display_options['fields']['created']['id'] = 'created';
$handler->display->display_options['fields']['created']['table'] = 'node';
$handler->display->display_options['fields']['created']['field'] = 'created';
$handler->display->display_options['fields']['created']['label'] = 'Date Created';
$handler->display->display_options['fields']['created']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['created']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['created']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['created']['alter']['external'] = 0;
$handler->display->display_options['fields']['created']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['created']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['created']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['created']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['created']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['created']['alter']['more_link'] = 0;
$handler->display->display_options['fields']['created']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['created']['alter']['trim'] = 0;
$handler->display->display_options['fields']['created']['alter']['html'] = 0;
$handler->display->display_options['fields']['created']['element_label_colon'] = 1;
$handler->display->display_options['fields']['created']['element_default_classes'] = 1;
$handler->display->display_options['fields']['created']['hide_empty'] = 0;
$handler->display->display_options['fields']['created']['empty_zero'] = 0;
$handler->display->display_options['fields']['created']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['created']['date_format'] = 'short';
/* Field: Content: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['label'] = 'Subject Line';
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['title']['alter']['external'] = 0;
$handler->display->display_options['fields']['title']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['title']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 0;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 0;
$handler->display->display_options['fields']['title']['alter']['more_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['element_label_colon'] = 1;
$handler->display->display_options['fields']['title']['element_default_classes'] = 1;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['title']['link_to_node'] = 1;
/* Field: Content: Newsletter category */
$handler->display->display_options['fields']['field_simplenews_term']['id'] = 'field_simplenews_term';
$handler->display->display_options['fields']['field_simplenews_term']['table'] = 'field_data_field_simplenews_term';
$handler->display->display_options['fields']['field_simplenews_term']['field'] = 'field_simplenews_term';
$handler->display->display_options['fields']['field_simplenews_term']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_simplenews_term']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_simplenews_term']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_simplenews_term']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_simplenews_term']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_simplenews_term']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_simplenews_term']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_simplenews_term']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_simplenews_term']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_simplenews_term']['alter']['more_link'] = 0;
$handler->display->display_options['fields']['field_simplenews_term']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_simplenews_term']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_simplenews_term']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_simplenews_term']['element_label_colon'] = 1;
$handler->display->display_options['fields']['field_simplenews_term']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_simplenews_term']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_simplenews_term']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_simplenews_term']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['field_simplenews_term']['field_api_classes'] = 0;
/* Field: Simplenews issue: Sent status */
$handler->display->display_options['fields']['status']['id'] = 'status';
$handler->display->display_options['fields']['status']['table'] = 'simplenews_newsletter';
$handler->display->display_options['fields']['status']['field'] = 'status';
$handler->display->display_options['fields']['status']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['status']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['status']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['status']['alter']['external'] = 0;
$handler->display->display_options['fields']['status']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['status']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['status']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['status']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['status']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['status']['alter']['more_link'] = 0;
$handler->display->display_options['fields']['status']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['status']['alter']['trim'] = 0;
$handler->display->display_options['fields']['status']['alter']['html'] = 0;
$handler->display->display_options['fields']['status']['element_label_colon'] = 1;
$handler->display->display_options['fields']['status']['element_default_classes'] = 1;
$handler->display->display_options['fields']['status']['hide_empty'] = 0;
$handler->display->display_options['fields']['status']['empty_zero'] = 0;
$handler->display->display_options['fields']['status']['hide_alter_empty'] = 1;
/* Field: Simplenews issue: Subscriber count */
$handler->display->display_options['fields']['sent_subscriber_count']['id'] = 'sent_subscriber_count';
$handler->display->display_options['fields']['sent_subscriber_count']['table'] = 'simplenews_newsletter';
$handler->display->display_options['fields']['sent_subscriber_count']['field'] = 'sent_subscriber_count';
$handler->display->display_options['fields']['sent_subscriber_count']['label'] = 'Number Mailed';
$handler->display->display_options['fields']['sent_subscriber_count']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['sent_subscriber_count']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['sent_subscriber_count']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['sent_subscriber_count']['alter']['external'] = 0;
$handler->display->display_options['fields']['sent_subscriber_count']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['sent_subscriber_count']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['sent_subscriber_count']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['sent_subscriber_count']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['sent_subscriber_count']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['sent_subscriber_count']['alter']['more_link'] = 0;
$handler->display->display_options['fields']['sent_subscriber_count']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['sent_subscriber_count']['alter']['trim'] = 0;
$handler->display->display_options['fields']['sent_subscriber_count']['alter']['html'] = 0;
$handler->display->display_options['fields']['sent_subscriber_count']['element_label_colon'] = 1;
$handler->display->display_options['fields']['sent_subscriber_count']['element_default_classes'] = 1;
$handler->display->display_options['fields']['sent_subscriber_count']['hide_empty'] = 0;
$handler->display->display_options['fields']['sent_subscriber_count']['empty_zero'] = 0;
$handler->display->display_options['fields']['sent_subscriber_count']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['sent_subscriber_count']['format_plural'] = 0;
/* Field: Simplenews issue: Send newsletter */
$handler->display->display_options['fields']['send']['id'] = 'send';
$handler->display->display_options['fields']['send']['table'] = 'simplenews_newsletter';
$handler->display->display_options['fields']['send']['field'] = 'send';
$handler->display->display_options['fields']['send']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['send']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['send']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['send']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['send']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['send']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['send']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['send']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['send']['alter']['more_link'] = 0;
$handler->display->display_options['fields']['send']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['send']['alter']['trim'] = 0;
$handler->display->display_options['fields']['send']['alter']['html'] = 0;
$handler->display->display_options['fields']['send']['element_label_colon'] = 1;
$handler->display->display_options['fields']['send']['element_default_classes'] = 1;
$handler->display->display_options['fields']['send']['hide_empty'] = 0;
$handler->display->display_options['fields']['send']['empty_zero'] = 0;
$handler->display->display_options['fields']['send']['hide_alter_empty'] = 1;
/* Sort criterion: Content: Post date */
$handler->display->display_options['sorts']['created']['id'] = 'created';
$handler->display->display_options['sorts']['created']['table'] = 'node';
$handler->display->display_options['sorts']['created']['field'] = 'created';
$handler->display->display_options['sorts']['created']['order'] = 'DESC';
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
'simplenews' => 'simplenews',
);
/* Display: Block */
$handler = $view->new_display('block', 'Block', 'block');
Comments
Comment #1
BerdirComment #2
JordiTR CreditAttribution: JordiTR commentedHi, I've updated to the last Simplenews 1.0 version and that message is already there. It happens to me on a views listing all published simplenews nodes on a table where I've added on a columns the "Send newsletter" field. After that when I see the page with that views it displays that "notice warning". If I delete that field and save, the page doesn't display the warning anymore. Any clue?
Comment #3
JordiTR CreditAttribution: JordiTR commentedI've tried both a in site with Drupal 7.12 + Views 3.3 and another with Drupal 7.16 + Views 3.5 and on both site using that "Send newsletter" field handler causes that "Notice: Undefined index: entity type en views_handler_field_entity->init() (line 44 de /usr/home/sitename/web/sites/all/modules/views/handlers/views_handler_field_entity.inc)" message.
Comment #4
JordiTR CreditAttribution: JordiTR commentedThat message also jumps when clearing cache. Just to provide more information :-)
Comment #5
deanflory CreditAttribution: deanflory commentedAnd running update.php (which clears cache).
Comment #6
Olivier Beerens CreditAttribution: Olivier Beerens commentedSame here, any news ?
Comment #7
stevenx CreditAttribution: stevenx commentedI can confirm this issue.
When you add the newsletter send link field the error comes up on line 44
Comment #8
stevenx CreditAttribution: stevenx commentedI worked around this issue with the module views_php and simply added a field which does the same.
Hope this dirty trick helps...
Comment #9
pawel.traczynski CreditAttribution: pawel.traczynski commentedDrupal way below :)
Comment #10
rcodina CreditAttribution: rcodina commentedPlease, check out this comment on another issue:
https://www.drupal.org/node/1714934#comment-9724413
Comment #11
corvus_ch CreditAttribution: corvus_ch commentedComment #12
CmKeen CreditAttribution: CmKeen commentedThe workaround should work but it is still a workaround.
I don't really want to install views_php just to avoid hitting this bug.
Any idea on how this could be patched?
Comment #13
dat deaf drupaler CreditAttribution: dat deaf drupaler as a volunteer commentedCheck out this patch which solved this issue in my case.
https://www.drupal.org/project/views/issues/1364064#comment-12589172