I'm getting 500 errors on a site of mine, with this in the logs:

PHP Fatal error: Unsupported operand types in commerce/includes/commerce.controller.inc on line 335

Lines 333-336:

    // Add in fields.
    if (!empty($this->entityInfo['fieldable'])) {
      $entity->content += field_attach_view($this->entityType, $entity, $view_mode, $langcode);
    }

Comments

Kasper Souren created an issue. See original summary.

rszrama’s picture

Version: 7.x-1.11 » 7.x-1.x-dev
Category: Bug report » Support request
Status: Active » Postponed (maintainer needs more info)

There's not enough information here to begin to understand what might be going wrong. It appears to me your $entity->content variable must have been initialized to a scalar value or something, which prevents it from an array union with the return value of field_attach_view(). The issue for you to debug then will be what it is that's initializing this value.

ElemAm024’s picture

I'm having a similar issue (or at least, it seems related) when trying to access the checkout page - log message is Fatal error: Unsupported operand types in ...entity/views/entity.property.inc on line 113.

Lines 111-113:

function entity_property_query($entity_type, $property, $value, $limit = 30) {
$properties = entity_get_all_property_info($entity_type);
$info = $properties[$property] + array('type' => 'text', 'queryable' => !empty($properties[$property]['schema field']));

mark_fullmer’s picture

@ElemAm024, if it helps, I received the same "Unsupported operand types in ...entity/views/entity.property.inc on line 113" error due to an outdated, Featurized version of a commerce tax entity that referenced a Rules condition that no longer applied. Once I removed the outdated items, the operand type error disappeared.

Obviously, you've probably got something very different triggering this, but maybe simple process of elimination -- disabling various commerce components will lead you to a similar discovery.

ElemAm024’s picture

Thanks, mark! I actually was able to (finally) pinpoint the problem, which turned out to be the FedEx shipping module, and disabling that fixed everything. Still not sure what the specific problem was, but it could definitely be related to outdated or broken rules conditions.

bojanz’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)
donquixote’s picture

Status: Closed (works as designed) » Closed (duplicate)
Related issues: +#2332955: Nested entity rendering problem in DrupalCommerceEntityController::buildContent()

This is a symptom of #2332955: Nested entity rendering problem in DrupalCommerceEntityController::buildContent(), which already has a patch.
I am changing the status to "Duplicate".