diff --git a/src/Entity/PageListener.php b/src/Entity/PageListener.php index dd9e9fd6c..d497f9e59 100644 --- a/src/Entity/PageListener.php +++ b/src/Entity/PageListener.php @@ -63,6 +63,7 @@ public function onFlush(OnFlushEventArgs $args) foreach ($unitOfWork->getScheduledEntityUpdates() as $entity) { if ($entity instanceof PageInterface) { if ($contentRoute = $entity->getContentRoute()) { + $em->refresh($contentRoute); $contentRoute->setPath(PageHelper::getPageRoutePath($entity->getPath())); $em->persist($contentRoute); $unitOfWork->computeChangeSet($em->getClassMetadata(get_class($contentRoute)), $contentRoute);