Here is my notice in my logs:

Emplacement http://toto.com/admin/structure/views/view/test2/preview/page/ajax
Référent http://toto.com/admin/structure/views/view/test2/edit?render=overlay
Message Notice : Undefined index: dans views_plugin_row_node_view->render() (ligne 101 dans /var/www/toto.com/sites/all/modules/views/modules/node/views_plugin_row_node_view.inc).

CommentFileSizeAuthor
#14 1484336-notice.patch829 bytesdamiankloip
#11 1484336-notice.patch829 bytesdawehner
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

You know "dans" isn't a word which is common in drupal world. Maybe it would help if you set up your site language to english, so people can understand the error message.

Anonymous’s picture

Here is the english translation:

Location http://toto.com/admin/structure/views/view/test2/preview/page/ajax
Referrer http://toto.com/admin/structure/views/view/test2/edit?render=overlay
Message Notice : Undefined index: in views_plugin_row_node_view->render() (line 101 in /var/www/toto.com/sites/all/modules/views/modules/node/views_plugin_row_node_view.inc).

dawehner’s picture

Fixing all these issues is possible though it would be better to find out whether there is a fundamental other bug which just causes this problem. To find this fundamental bug some way to reproducing would be helpful.

Anonymous’s picture

Yup, sure!

But it's not always possible to find how to reproduce the bug. Would be so trivial ;)
Btw, I understand that's not a ideal bug report, but I cannot do better. Sorry for that.

Let's wait for another error !

damiankloip’s picture

Status: Active » Postponed (maintainer needs more info)

Waiting....

esmerel’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)
Anonymous’s picture

Status: Closed (cannot reproduce) » Active

The same error took place on my production server this morning. It's a really simple node-view filtering to display only active nodes of a certain type. Caching of the view is turned off. The view tries to show a bad node. The node entity exists, but it lacks of all fields.

A simple check at the beginning of views_plugin_row_node_view->render() heals the situation:

    if (!array_key_exists($row->{$this->field_alias}, $this->nodes)) return '';

This way, views doesn't try to display non-existent fields.

The cause of this is (most likely) a user tried to populate a numeric field with 9.999.999.999 while maximum int is 2.147.483.647. See #1003692: PDOException: SQLSTATE[22003] after entering large value in integer and decimal field.

I activate this issue, because I think it is useful for views to be hardened against such "hard to debug" errors. Accessing bad entity properties can be avoided, at the price of a bunch of array_key_exists() per view, though.

elzix’s picture

This fixed the problem. I suggest the next version of views includes:

  function render($row) {
    if (!array_key_exists($row->{$this->field_alias}, $this->nodes)): return '';
    else:
      $node = $this->nodes[$row->{$this->field_alias}];
      $node->view = $this->view;
      $build = node_view($node, $this->options['view_mode']);

      return drupal_render($build);
    endif;
  }

at the end of views_plugin_row_node_view.inc

ygerasimov’s picture

Status: Active » Postponed (maintainer needs more info)

Sorry, but it is still not clear how to reproduce this bug.

Please advise how to create a "bad" node that throws an error in a view? As I understood a view is teasers display nodes view with filter of published and certain content type (for example article). Please correct me if I am wrong.

Anonymous’s picture

Status: Postponed (maintainer needs more info) » Active

One source for bad nodes is a bug in the field system described in #7. It's reported to the field system issue queue and will be fixed, but that'll take time. There might also be other sources for bad nodes.

To reproduce:

- Create a node type with an integer field
- Create a new node of that type and set the value of the integer field to 9999999999 (or any value too big for the corresponding database table)
- Create a view containing that node, e.g. a listing of the recent nodes. *

For in depth instructions on how to reproduce bad nodes, see comment #17 of #1003692: PDOException: SQLSTATE[22003] after entering large value in integer and decimal field if required.

*) NB: Reading this line of my own writing, I just understand that I was very close to a homepage failure in the production environment. Just by accident this node type wasn't in a view on the homepage. It's this fatal effect why I think it should be handled in Views, although it's actually not in its responsibility.

dawehner’s picture

Status: Active » Needs review
FileSize
829 bytes

.

aspilicious’s picture

\ No newline at end of file

damiankloip’s picture

dawehner can put that in when he commits :)

damiankloip’s picture

FileSize
829 bytes
dawehner’s picture

Perfect! Committed as it is to both 7.x-3.x and 8.x-3.x

dawehner’s picture

Status: Needs review » Fixed

.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.