diff --git a/src/Kunstmaan/NodeBundle/EventListener/SlugListener.php b/src/Kunstmaan/NodeBundle/EventListener/SlugListener.php index 754403a37e..1274272641 100644 --- a/src/Kunstmaan/NodeBundle/EventListener/SlugListener.php +++ b/src/Kunstmaan/NodeBundle/EventListener/SlugListener.php @@ -59,12 +59,10 @@ public function onKernelController(FilterControllerEvent $event) } $nodeTranslation = $request->attributes->get('_nodeTranslation'); - $entity = $nodeTranslation->getPublicNodeVersion()->getRef($this->em); + $entity = $nodeTranslation->getRef($this->em); //if the entity is an instance of the SlugControllerActionInterface, change the controller if ($entity instanceof SlugActionInterface) { - - $entity = $nodeTranslation->getRef($this->em); $request->attributes->set('_entity', $entity); //do security check by firing an event that gets handled by the SlugSecurityListener