Hi,

an undefined variable is used into the Entity class constructor ($info). As a result, 'status' key is assumed by default. So any custom key for 'status' could not be set.

thanks

CommentFileSizeAuthor
#1 entity-status_key-2167945-1.patch672 byteschaby
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chaby’s picture

Status: Active » Needs review
FileSize
672 bytes
chaby’s picture

Up this issue because it is straightforward, this mistake is in the entity constructor itself and mostly, could be fixed quickly without testing ? Note that currently, this simple patch doesn't seems to be reroll...

Chris Matthews’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

The 5 year old patch to entity.inc does not apply to the latest entity 7.x-1.x-dev and (if still relevant) needs reroll.

Checking patch includes/entity.inc...
error: while searching for:
    $this->entityInfo = entity_get_info($this->entityType);
    $this->idKey = $this->entityInfo['entity keys']['id'];
    $this->nameKey = isset($this->entityInfo['entity keys']['name']) ? $this->entityInfo['entity keys']['name'] : $this->idKey;
    $this->statusKey = empty($info['entity keys']['status']) ? 'status' : $info['entity keys']['status'];
  }

  /**

error: patch failed: includes/entity.inc:56
error: includes/entity.inc: patch does not apply