Problem/Motivation

When indexing webform_ab nodes via core search, the following watchdog entry shows up.

EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7729 of includes/common.inc).

This is due to some paths in webform_ab_view() not returning the $node. In this case the view mode is "search_index" and $node->included_webforms is not empty. So execution falls through the conditions without a return value.

This can be recreated by adding a webform_ab node, including webforms with it, and running cron while core search is enabled and configured to index nodes.

Proposed resolution

Add a "return $node;" at the very end of webform_ab_view() so that the node will always be returned.

Remaining tasks

In reality, webform_ab nodes probably shouldn't be indexed by core search anyway. I didn't see an easy way to get around that. In this case only the title is indexed at least.

Comments

davidbarbarisi@gmail.com’s picture

Status: Active » Needs review

  • 15babe2 committed on 7.x-2.x
    Issue #2389357 by dbarbar: Fixed EntityMalformedException during cron...
visuaLatte’s picture

Status: Needs review » Fixed

Thanks, David, this patch is applied and version 2.3 is created.

visuaLatte’s picture

Status: Fixed » Closed (fixed)