EntityAPIController->invoke() is trying to access $this->nameKey property, which is not defined by construct():
<?php
elseif ($hook == 'update' && $id = $entity->{$this->nameKey}) {
if ($entity->original->{$this->bundleKey} != $entity->{$this->bundleKey}) {
field_attach_rename_bundle($type, $entity->original->{$this->bundleKey}, $entity->{$this->bundleKey});
}
}
?>
I suppose this code from EntityAPIControllerExportable:
<?php $this->nameKey = isset($this->entityInfo['entity keys']['name']) ? $this->entityInfo['entity keys']['name'] : $this->idKey;?>
should be moved to EntityAPIController constructor.
Comments
Comment #1
fagotrue. I doesn't look like the id is used at all, so let's remove it.
Comment #2
fagoand committed.