The alter hook 'hook_inline_entity_form_table_fields_alter' provides the functionality for developers to add fields to the inline entity form table. This way, developers can add project specific fields to the table.

However, the entity reference can reference different bundles where not every bundle is required to have the same fields. When implementing hook_inline_entity_form_table_fields_alter to add a field that is not present in every bundle, the form produces a WSOD.

E.g.: The commerce_order form with widget "Inline entity form - Multiple values" for line items. A product line item with extra fields. The commerce_coupon module which adds a line item type. When implementing hook_inline_entity_form_table_fields_alter to add the extra fields from the product line item the commerce_order edit form produces a WSOD because the extra fields are not present on the coupon line item.

Inside the function theme_inline_entity_form_entity_table where the extra fields are loaded using field_view_field(), an extra check if the field exists fixes this issue.

A patch is provided in attachment.

Files: 

Comments

Status:Active» Needs review

Issue summary:View changes
Status:Needs review» Fixed

Status:Fixed» Closed (fixed)

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