diff --git a/Routing/ArticleRouteDefaultProvider.php b/Routing/ArticleRouteDefaultProvider.php index a4e8af11..71f9bc6b 100644 --- a/Routing/ArticleRouteDefaultProvider.php +++ b/Routing/ArticleRouteDefaultProvider.php @@ -20,6 +20,7 @@ use Sulu\Bundle\RouteBundle\Routing\Defaults\RouteDefaultsProviderInterface; use Sulu\Component\Content\Compat\Structure\StructureBridge; use Sulu\Component\Content\Compat\StructureManagerInterface; +use Sulu\Component\Content\Document\Behavior\ShadowLocaleBehavior; use Sulu\Component\Content\Document\WorkflowStage; use Sulu\Component\Content\Metadata\Factory\StructureMetadataFactoryInterface; use Sulu\Component\Content\Metadata\StructureMetadata; @@ -131,7 +132,7 @@ public function isPublished($entityClass, $id, $locale) return false; } - if ($object->isShadowLocaleEnabled()) { + if ($object instanceof ShadowLocaleBehavior && $object->isShadowLocaleEnabled()) { $object = $this->documentManager->find( $id, $object->getShadowLocale(),