When an entity reference field is created with an entity target type, if the module providing that entity type is disabled, you get errors like these in the original entity edit form:

Fatal error: Class name must be a valid object or a string in \includes\common.inc on line 7894

This is because the widget should not be loaded in case the entity referenced in target type doesn't exist anymore.
Patch attached.

Related: #1864982: Error message when trying to edit an order

Files: 
CommentFileSizeAuthor
entity_reference-widget_check.patch825 bytespcambra
PASSED: [[SimpleTest]]: [MySQL] 119 pass(es).
[ View ]

Comments

Status:Needs review» Fixed

Committed, thanks.

Thanks!

We might want to check the formatters as well.

Status:Fixed» Closed (fixed)

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