From ecae5b2389f4f5c9814d9851d633cfafe890da4f Mon Sep 17 00:00:00 2001 From: Nikita Hovratov Date: Tue, 23 Apr 2024 09:22:16 +0200 Subject: [PATCH] [BUGFIX] Ignore page restriction of Page Type Collections Fixes: #184 --- .../Definition/Factory/TableDefinitionCollectionFactory.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Classes/Definition/Factory/TableDefinitionCollectionFactory.php b/Classes/Definition/Factory/TableDefinitionCollectionFactory.php index c63adc37..2322e94a 100644 --- a/Classes/Definition/Factory/TableDefinitionCollectionFactory.php +++ b/Classes/Definition/Factory/TableDefinitionCollectionFactory.php @@ -118,7 +118,10 @@ private function enrichTableDefinition( $newTableDefinition = $newTableDefinition->withParentReferences($references); // If root Content Type is a Content Element, allow the external table to be put in standard pages. foreach ($references as $reference) { - if ($reference->getParentContentType() === ContentType::CONTENT_ELEMENT) { + if ( + $reference->getParentContentType() === ContentType::CONTENT_ELEMENT + || $reference->getParentContentType() === ContentType::PAGE_TYPE + ) { $capability = $newTableDefinition->getCapability(); $capability = $capability->withIgnorePageTypeRestriction(true); $newTableDefinition = $newTableDefinition->withCapability($capability);