diff --git a/Classes/Controller/BackendController.php b/Classes/Controller/BackendController.php index 72b1c2a3ea..4878424ad0 100644 --- a/Classes/Controller/BackendController.php +++ b/Classes/Controller/BackendController.php @@ -26,6 +26,7 @@ use Neos\Neos\Controller\Backend\MenuHelper; use Neos\Neos\Domain\Repository\DomainRepository; use Neos\Neos\Domain\Repository\SiteRepository; +use Neos\Neos\Domain\Service\NodeTypeNameFactory; use Neos\Neos\Domain\Service\WorkspaceNameBuilder; use Neos\Neos\FrontendRouting\NodeAddressFactory; use Neos\Neos\FrontendRouting\SiteDetection\SiteDetectionResult; @@ -170,7 +171,7 @@ public function indexAction(string $node = null) // to call the contentGraph here directly. $rootNodeAggregate = $contentRepository->getContentGraph()->findRootNodeAggregateByType( $workspace->currentContentStreamId, - NodeTypeName::fromString('Neos.Neos:Sites') + NodeTypeNameFactory::forSites() ); $rootNode = $rootNodeAggregate->getNodeByCoveredDimensionSpacePoint($defaultDimensionSpacePoint); diff --git a/Tests/IntegrationTests/TestDistribution/DistributionPackages/Neos.Test.OneDimension/Resources/Private/Content/events.jsonl b/Tests/IntegrationTests/TestDistribution/DistributionPackages/Neos.Test.OneDimension/Resources/Private/Content/events.jsonl index 89cd67b6e6..6bd38fbfeb 100644 --- a/Tests/IntegrationTests/TestDistribution/DistributionPackages/Neos.Test.OneDimension/Resources/Private/Content/events.jsonl +++ b/Tests/IntegrationTests/TestDistribution/DistributionPackages/Neos.Test.OneDimension/Resources/Private/Content/events.jsonl @@ -1,6 +1,6 @@ {"identifier":"d08644be-70fd-4f47-9078-f676bbe13544","type":"ContentStreamWasCreated","payload":{"contentStreamId":"7ebcc393-4120-4d29-a0d8-8bc708ecb3f8"},"metadata":[]} {"identifier":"152f7ffe-b2a5-4237-beab-c4db9fa15587","type":"RootNodeAggregateWithNodeWasCreated","payload":{"contentStreamId":"7ebcc393-4120-4d29-a0d8-8bc708ecb3f8","nodeAggregateId":"2fdbb3ea-1270-49bc-8f8b-cbfc563ef9a6","nodeTypeName":"Neos.Neos:Sites","coveredDimensionSpacePoints":[{"language":"en_US"},{"language":"en_UK"},{"language":"de"},{"language":"nl"},{"language":"fr"},{"language":"da"},{"language":"lv"}],"nodeAggregateClassification":"root"},"metadata":[]} -{"identifier":"c977a059-ba63-4132-a190-baa6ced4f614","type":"NodeAggregateWithNodeWasCreated","payload":{"contentStreamId":"7ebcc393-4120-4d29-a0d8-8bc708ecb3f8","nodeAggregateId":"f676459d-ca77-44bc-aeea-44114814c279","nodeTypeName":"Neos.TestNodeTypes:Document.Page","originDimensionSpacePoint":{"language":"fr"},"coveredDimensionSpacePoints":[{"language":"fr"}],"parentNodeAggregateId":"2fdbb3ea-1270-49bc-8f8b-cbfc563ef9a6","nodeName":"neos-test-onedimension","initialPropertyValues":{"title":{"value":"Accueil","type":"string"},"uriPathSegment":{"value":"home","type":"string"}},"nodeAggregateClassification":"regular","succeedingNodeAggregateId":null},"metadata":[]} +{"identifier":"c977a059-ba63-4132-a190-baa6ced4f614","type":"NodeAggregateWithNodeWasCreated","payload":{"contentStreamId":"7ebcc393-4120-4d29-a0d8-8bc708ecb3f8","nodeAggregateId":"f676459d-ca77-44bc-aeea-44114814c279","nodeTypeName":"Neos.TestNodeTypes:Document.HomePage","originDimensionSpacePoint":{"language":"fr"},"coveredDimensionSpacePoints":[{"language":"fr"}],"parentNodeAggregateId":"2fdbb3ea-1270-49bc-8f8b-cbfc563ef9a6","nodeName":"neos-test-onedimension","initialPropertyValues":{"title":{"value":"Accueil","type":"string"},"uriPathSegment":{"value":"home","type":"string"}},"nodeAggregateClassification":"regular","succeedingNodeAggregateId":null},"metadata":[]} {"identifier":"7e1e6a07-b80f-4cad-8fe6-519d34b86cad","type":"NodePeerVariantWasCreated","payload":{"contentStreamId":"7ebcc393-4120-4d29-a0d8-8bc708ecb3f8","nodeAggregateId":"f676459d-ca77-44bc-aeea-44114814c279","sourceOrigin":{"language":"fr"},"peerOrigin":{"language":"en_UK"},"peerCoverage":[{"language":"en_UK"}]},"metadata":[]} {"identifier":"37c01008-80f0-4252-8ff5-d44154cec8e7","type":"NodePropertiesWereSet","payload":{"contentStreamId":"7ebcc393-4120-4d29-a0d8-8bc708ecb3f8","nodeAggregateId":"f676459d-ca77-44bc-aeea-44114814c279","originDimensionSpacePoint":{"language":"en_UK"},"affectedDimensionSpacePoints":[{"language":"en_UK"}],"propertyValues":{"title":{"value":"Home","type":"string"},"uriPathSegment":{"value":"home","type":"string"},"image":{"value":{"__flow_object_type":"Neos\\Media\\Domain\\Model\\ImageVariant","__identifier":"50cd4a3e-1cc3-4bbb-b2ab-919abb4011f1"},"type":"Neos\\Media\\Domain\\Model\\ImageInterface"}}},"metadata":[]} {"identifier":"c30068ba-258b-4393-b0de-aaf37d43fe69","type":"NodeGeneralizationVariantWasCreated","payload":{"contentStreamId":"7ebcc393-4120-4d29-a0d8-8bc708ecb3f8","nodeAggregateId":"f676459d-ca77-44bc-aeea-44114814c279","sourceOrigin":{"language":"en_UK"},"generalizationOrigin":{"language":"en_US"},"generalizationCoverage":[{"language":"en_US"}]},"metadata":[]} diff --git a/Tests/IntegrationTests/TestDistribution/DistributionPackages/Neos.Test.TwoDimensions/Resources/Private/Content/events.jsonl b/Tests/IntegrationTests/TestDistribution/DistributionPackages/Neos.Test.TwoDimensions/Resources/Private/Content/events.jsonl index eb5e838523..6892581208 100644 --- a/Tests/IntegrationTests/TestDistribution/DistributionPackages/Neos.Test.TwoDimensions/Resources/Private/Content/events.jsonl +++ b/Tests/IntegrationTests/TestDistribution/DistributionPackages/Neos.Test.TwoDimensions/Resources/Private/Content/events.jsonl @@ -1,6 +1,6 @@ {"identifier":"0ebdfc06-3698-4ddb-83f5-109023213b84","type":"ContentStreamWasCreated","payload":{"contentStreamId":"ead48ed5-f915-44bd-8df8-29475c8b145b"},"metadata":[]} {"identifier":"55ea0055-eda8-4077-b3b0-2c2d599a8f27","type":"RootNodeAggregateWithNodeWasCreated","payload":{"contentStreamId":"ead48ed5-f915-44bd-8df8-29475c8b145b","nodeAggregateId":"2fbc3faf-663a-4ef0-b586-7b2c1c7fd342","nodeTypeName":"Neos.Neos:Sites","coveredDimensionSpacePoints":[{"country":"deu","language":"en_US"},{"country":"deu","language":"en_UK"},{"country":"deu","language":"de"},{"country":"deu","language":"fr"},{"country":"deu","language":"nl"},{"country":"deu","language":"lv"},{"country":"aut","language":"en_US"},{"country":"aut","language":"en_UK"},{"country":"aut","language":"de"},{"country":"aut","language":"fr"},{"country":"aut","language":"nl"},{"country":"aut","language":"lv"},{"country":"lux","language":"en_UK"},{"country":"lux","language":"de"},{"country":"dnk","language":"en_UK"},{"country":"dnk","language":"da"}],"nodeAggregateClassification":"root"},"metadata":[]} -{"identifier":"a9fdb629-97ce-4321-bbec-a1dbf27530fd","type":"NodeAggregateWithNodeWasCreated","payload":{"contentStreamId":"ead48ed5-f915-44bd-8df8-29475c8b145b","nodeAggregateId":"f676459d-ca77-44bc-aeea-44114814c279","nodeTypeName":"Neos.TestNodeTypes:Document.Page","originDimensionSpacePoint":{"country":"dnk","language":"da"},"coveredDimensionSpacePoints":[{"country":"dnk","language":"da"}],"parentNodeAggregateId":"2fbc3faf-663a-4ef0-b586-7b2c1c7fd342","nodeName":"neos-test-twodimensions","initialPropertyValues":{"title":{"value":"Home","type":"string"},"uriPathSegment":{"value":"home","type":"string"},"image":{"value":{"__flow_object_type":"Neos\\Media\\Domain\\Model\\ImageVariant","__identifier":"50cd4a3e-1cc3-4bbb-b2ab-919abb4011f1"},"type":"Neos\\Media\\Domain\\Model\\ImageInterface"}},"nodeAggregateClassification":"regular","succeedingNodeAggregateId":null},"metadata":[]} +{"identifier":"a9fdb629-97ce-4321-bbec-a1dbf27530fd","type":"NodeAggregateWithNodeWasCreated","payload":{"contentStreamId":"ead48ed5-f915-44bd-8df8-29475c8b145b","nodeAggregateId":"f676459d-ca77-44bc-aeea-44114814c279","nodeTypeName":"Neos.TestNodeTypes:Document.HomePage","originDimensionSpacePoint":{"country":"dnk","language":"da"},"coveredDimensionSpacePoints":[{"country":"dnk","language":"da"}],"parentNodeAggregateId":"2fbc3faf-663a-4ef0-b586-7b2c1c7fd342","nodeName":"neos-test-twodimensions","initialPropertyValues":{"title":{"value":"Home","type":"string"},"uriPathSegment":{"value":"home","type":"string"},"image":{"value":{"__flow_object_type":"Neos\\Media\\Domain\\Model\\ImageVariant","__identifier":"50cd4a3e-1cc3-4bbb-b2ab-919abb4011f1"},"type":"Neos\\Media\\Domain\\Model\\ImageInterface"}},"nodeAggregateClassification":"regular","succeedingNodeAggregateId":null},"metadata":[]} {"identifier":"06ce4e00-bede-4d76-a6b9-02c646ce933b","type":"NodePeerVariantWasCreated","payload":{"contentStreamId":"ead48ed5-f915-44bd-8df8-29475c8b145b","nodeAggregateId":"f676459d-ca77-44bc-aeea-44114814c279","sourceOrigin":{"country":"dnk","language":"da"},"peerOrigin":{"country":"deu","language":"lv"},"peerCoverage":[{"country":"deu","language":"lv"},{"country":"aut","language":"lv"}]},"metadata":[]} {"identifier":"c8b2be8f-fd74-4ea5-b2f8-35a3876d11a9","type":"NodePropertiesWereSet","payload":{"contentStreamId":"ead48ed5-f915-44bd-8df8-29475c8b145b","nodeAggregateId":"f676459d-ca77-44bc-aeea-44114814c279","originDimensionSpacePoint":{"country":"deu","language":"lv"},"affectedDimensionSpacePoints":[{"country":"deu","language":"lv"},{"country":"aut","language":"lv"}],"propertyValues":{"title":{"value":"M\u0101jas","type":"string"},"uriPathSegment":{"value":"home","type":"string"}}},"metadata":[]} {"identifier":"c2c89695-2e12-41ac-bc4a-9b197b67a6f8","type":"NodePeerVariantWasCreated","payload":{"contentStreamId":"ead48ed5-f915-44bd-8df8-29475c8b145b","nodeAggregateId":"f676459d-ca77-44bc-aeea-44114814c279","sourceOrigin":{"country":"deu","language":"lv"},"peerOrigin":{"country":"deu","language":"en_US"},"peerCoverage":[{"country":"deu","language":"en_US"},{"country":"aut","language":"en_US"},{"country":"deu","language":"en_UK"},{"country":"aut","language":"en_UK"},{"country":"lux","language":"en_UK"}]},"metadata":[]} diff --git a/Tests/IntegrationTests/TestDistribution/DistributionPackages/Neos.TestNodeTypes/NodeTypes/Document/HomePage.yaml b/Tests/IntegrationTests/TestDistribution/DistributionPackages/Neos.TestNodeTypes/NodeTypes/Document/HomePage.yaml new file mode 100644 index 0000000000..c0009c69eb --- /dev/null +++ b/Tests/IntegrationTests/TestDistribution/DistributionPackages/Neos.TestNodeTypes/NodeTypes/Document/HomePage.yaml @@ -0,0 +1,4 @@ +'Neos.TestNodeTypes:Document.HomePage': + superTypes: + 'Neos.Neos:Site': true + 'Neos.TestNodeTypes:Document.Page': true diff --git a/Tests/IntegrationTests/TestDistribution/DistributionPackages/Neos.TestNodeTypes/Resources/Private/Fusion/Document/Page/HomePage.fusion b/Tests/IntegrationTests/TestDistribution/DistributionPackages/Neos.TestNodeTypes/Resources/Private/Fusion/Document/Page/HomePage.fusion new file mode 100644 index 0000000000..f55a6eecac --- /dev/null +++ b/Tests/IntegrationTests/TestDistribution/DistributionPackages/Neos.TestNodeTypes/Resources/Private/Fusion/Document/Page/HomePage.fusion @@ -0,0 +1 @@ +prototype(Neos.TestNodeTypes:Document.HomePage) < prototype(Neos.TestNodeTypes:Document.Page) diff --git a/Tests/IntegrationTests/e2e-docker.sh b/Tests/IntegrationTests/e2e-docker.sh index ec2895235d..19b8b1c82a 100755 --- a/Tests/IntegrationTests/e2e-docker.sh +++ b/Tests/IntegrationTests/e2e-docker.sh @@ -56,14 +56,14 @@ dc exec -T php bash <<-'BASH' ./flow user:create --username=admin --password=admin --first-name=John --last-name=Doe --roles=Administrator || true ./flow cr:setup --content-repository onedimension - ./flow site:create neos-test-onedimension Neos.Test.OneDimension Neos.TestNodeTypes:Document.Page + ./flow site:create neos-test-onedimension Neos.Test.OneDimension Neos.TestNodeTypes:Document.HomePage ./flow domain:add neos-test-onedimension onedimension.localhost --port 8081 # TODO: Replace with "--assume-yes" flag once "./flow cr:prune" has one printf "y\n" | ./flow cr:prune --content-repository onedimension ./flow cr:import --content-repository onedimension --path ./DistributionPackages/Neos.Test.OneDimension/Resources/Private/Content ./flow cr:setup --content-repository twodimensions - ./flow site:create neos-test-twodimensions Neos.Test.TwoDimensions Neos.TestNodeTypes:Document.Page + ./flow site:create neos-test-twodimensions Neos.Test.TwoDimensions Neos.TestNodeTypes:Document.HomePage ./flow domain:add neos-test-twodimensions twodimensions.localhost --port 8081 # TODO: Replace with "--assume-yes" flag once "./flow cr:prune" has one printf "y\n" | ./flow cr:prune --content-repository twodimensions diff --git a/Tests/IntegrationTests/e2e.sh b/Tests/IntegrationTests/e2e.sh index e1331bcebb..52e251da0f 100755 --- a/Tests/IntegrationTests/e2e.sh +++ b/Tests/IntegrationTests/e2e.sh @@ -9,14 +9,14 @@ fi cd ../../.. ./flow cr:setup --content-repository onedimension -./flow site:create neos-test-onedimension Neos.Test.OneDimension Neos.TestNodeTypes:Document.Page +./flow site:create neos-test-onedimension Neos.Test.OneDimension Neos.TestNodeTypes:Document.HomePage ./flow domain:add neos-test-onedimension onedimension.localhost --port 8081 # TODO: Replace with "--assume-yes" flag once "./flow cr:prune" has one printf "y\n" | ./flow cr:prune --content-repository onedimension ./flow cr:import --content-repository onedimension --path ./DistributionPackages/Neos.Test.OneDimension/Resources/Private/Content ./flow cr:setup --content-repository twodimensions -./flow site:create neos-test-twodimensions Neos.Test.TwoDimensions Neos.TestNodeTypes:Document.Page +./flow site:create neos-test-twodimensions Neos.Test.TwoDimensions Neos.TestNodeTypes:Document.HomePage ./flow domain:add neos-test-twodimensions twodimensions.localhost --port 8081 # TODO: Replace with "--assume-yes" flag once "./flow cr:prune" has one printf "y\n" | ./flow cr:prune --content-repository twodimensions