A setup is a field collection entity, one of which fields is a custom field with an embedded view. This results in a 'bad operand' critical error in entity.controller.inc, which comes from the fact that += is used to merge arrays rather than array_merge(). using array merge solves the problem. Please use array_merge() to merge the arrays in buildContent().

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexrayu’s picture

Status: Active » Needs review
FileSize
1021 bytes

Here is a proposed patch.

alexrayu’s picture

Issue summary: View changes

Status: Needs review » Needs work

The last submitted patch, 1: entity_2344689_1_array_merge.patch, failed testing.

alexrayu’s picture

Status: Needs work » Needs review
FileSize
941 bytes

Corrected file paths.

Status: Needs review » Needs work

The last submitted patch, 4: entity_array_merge_2344689-4.patch, failed testing.

alexrayu’s picture

Status: Needs work » Needs review
FileSize
861 bytes

More corrections to patch.

alexrayu’s picture

Please review and include in the release! It seems like a little thing, but it makes the difference between a normal work of the site and a critical error in our case.

Chris Matthews’s picture

Version: 7.x-1.5 » 7.x-1.x-dev

The 4 year old patch in #6 to entity.controller.inc applied cleanly to the latest entity 7.x-1.x-dev and (if still relevant) needs review.