This is a known issues in the Drupal Entity API module that has not been resolved, presumably because of backward compatibility and custom modules that may have already adapted their own solutions. See these issues 1572466, 1823926 and 1273756
To reproduce
Create a new entity type that uses EntityPlusController, or use the contrib module Basic Entity Plus
Otherwise, a good workaround is to override EntityPlusController::cacheGet() as explained in 1572466, as follows:
/**
* Implements a controller class for MyEntity.
*/
class MyEntityController extends EntityPlusController {
/**
* Overrides EntityPlusController::cacheGet()
*/
protected function cacheGet($ids, $conditions = array()) {
// Load any available entities from the internal cache.
if ($ids === FALSE && !$conditions) {
return $this->entityCache;
}
return parent::cacheGet($ids, $conditions);
}
}
This is a known issues in the Drupal Entity API module that has not been resolved, presumably because of backward compatibility and custom modules that may have already adapted their own solutions. See these issues 1572466, 1823926 and 1273756
To reproduce
EntityPlusController
, or use the contrib module Basic Entity PlusThe first output is correct (it includes all entities). The second output is an empty array.
The patch in 1273756 could be partially adapted.
Otherwise, a good workaround is to override
EntityPlusController::cacheGet()
as explained in 1572466, as follows: