If the output of a Lister field includes the node that the field is attached to then a WSOD with the following errors occurs:

Notice: Undefined property: stdClass::$content in node_build_content() (line 1415 of /var/www/modules/site/modules/node/node.module).
Error: Unsupported operand types in node_build_content() (line 1415 of /var/www/modules/site/modules/node/node.module).

This is because node_view() unsets $node->content after using it so when we try to render the node a second time $node->content does not exist. This also happens for Display Suite and other modules that can result in nested rendered nodes. There is a core bug dealing with this.

Workarounds

  1. Render specific fields rather than a view mode (if using lister_views or a custom implementation)
  2. Filter the results to not include the current node (lister_views could exclude the current nid, this or other plugins could filter by some other property)
  3. The patch in #8 in the core issue appears to fix this

Comments

justanothermark created an issue.