diff --git a/includes/translation.handler.fieldable_panels_panes.inc b/includes/translation.handler.fieldable_panels_panes.inc index ab29e39..d36fb0b 100644 --- a/includes/translation.handler.fieldable_panels_panes.inc +++ b/includes/translation.handler.fieldable_panels_panes.inc @@ -21,6 +21,20 @@ class EntityTranslationFieldablePanelsPanesHandler extends EntityTranslationDefa return fieldable_panels_panes_access($op, $this->entity); } + /** + * @see EntityTranslationHandlerInterface::getTranslations() + */ + public function getTranslations() { + + // Lazy load translations if for some reason the wrapped entity did not go + // through hook_entity_load(). + if (empty($this->entity->{$this->getTranslationsKey()}->original)) { + $this->loadTranslations(); + } + + return parent::getTranslations(); + } + protected function getEntityId() { if (isset($this->entity->fpid)) { return $this->entity->fpid;