This module isn't making sure the inserted entity exists before trying to embed it into the content.

This causes a Beans error across the entire site (even pages without any inserted tokens):

Recoverable fatal error: Argument 1 passed to bean_view() must be an instance of Bean, boolean given, called in /sites/projects/.../src/www/sites/all/modules/contrib/bean/bean.module on line 792 and defined in bean_view() (line 777 of /sites/projects/.../src/www/sites/all/modules/contrib/bean/bean.module).

This might also happen with other entity types, but Beans are the only ones I've noticed in my project.

Attached is a patch to fix this.

Comments

Tyler the Creator’s picture

Issue summary: View changes

Quote edit.

ben.bunk’s picture

The patch works but I added a small tweak to also do some error checking around the call to entity_view which could also cause errors if not handled.

Added a link to a bean issue that addresses this from the bean side.

johnpitcairn’s picture

johnpitcairn’s picture

johnpitcairn’s picture

Assigned: Tyler the Creator » Unassigned

Unassigning