Just tested the Deploy module in combination with a view listing taxonomy terms, which leads to some errors. The errors are caused by a wrong entity type and a wrong base field. The attached patch fixes both.

Comments

dixon_’s picture

Status: Needs review » Fixed

Awesome, thanks! You are the man of the day! :)

Committed to 7.x-2.x.

Status: Fixed » Closed (fixed)

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

citlacom’s picture

Status: Closed (fixed) » Active

Hello,

I seen this issue and I'm surprised due experimenting the same problem but in reverse order. I mean that the $entity_type variable is null when this line is executed:

$entity_type = $table_data['table']['entity type'];

As a result when we call to entity_load( $entity_type = '', $ids = array (0 => 7, 1 => 6), $conditions = ???, $reset = ??? ) that variable is not defined and raise a fatal error.

I'm trying to create a Feature which export the nodes into a Feature using UUID last dev version and the last dev version of Deploy. If I revert this patch this error get resolved. Some ideas?

Thanks.

mh86’s picture

maybe your Views version isn't up-to-date?

alexiswatson’s picture

Status: Active » Needs review
StatusFileSize
new640 bytes

The entity type is indeed not fixed, despite all modules being at their latest devs. This is because we're getting $entity_keys as a type-keyed array of entity ids, but we're not actually looking at the key to get the entity type, causing all sorts of nightmarish things to happen stemming from $entity_type not being set properly (including the fatal error mentioned above).

The following patch should fix the issue. Review and feedback welcome!

alexiswatson’s picture

Status: Needs review » Needs work

Disregard. Breaks other things. Going to have to fix it from the other end...

aspilicious’s picture

Status: Needs work » Fixed

I think this is fixed now, please reopen if needed.

current code

    // Get the entity keys from the aggregator.
    $entity_keys = $plan->getEntities();
    foreach ($entity_keys as $entity_key) {
      // Get the entity info and all entities of this type.
      $entity_info = entity_get_info($entity_key['type']);
      $entities = entity_load($entity_key['type'], array($entity_key['id']));

Status: Fixed » Closed (fixed)

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