FluidTYPO3 / flux

TYPO3 extension Flux: Dynamic Fluid FlexForms
https://fluidtypo3.org
148 stars 214 forks source link

Bug: Creating New Page generating error because the Flux Provider 'Page' was not registered correctly #2135

Closed Sofatraining closed 9 months ago

Sofatraining commented 9 months ago

I have checked that the bug exists in the dev-development branch Yes

I have checked that there are no already open issues or recently closed issues about this bug Yes

Describe the bug Creating New Page generating error. FluidTYPO3\Flux\Service\PageService::getPageTemplateConfiguration(): Argument #1 ($pageUid) must be of type int, null given, called in /www/htdocs/.../typo3conf/ext/flux/Classes/Provider/PageProvider.php on line 87 TYPO3 12.4.6 Probably because the Flux Provider 'Page' was not registered correctly flux-provider Flux Provider 'Content' was registered correctly

Also you can see there are no entries in page properties under 'Page Layouts': page-properties

Entries in ext_localconf.php: \FluidTYPO3\Flux\Core::registerProviderExtensionKey('myextensionkey', 'Content'); \FluidTYPO3\Flux\Core::registerProviderExtensionKey('myextensionkey', 'Page'); 'myextensionkey' was of course replaced with the correct key.

To Reproduce Steps to reproduce the behavior:

  1. Go to Page
  2. Click on 'Create New' Wizard
  3. Click on 'Insert Page'
wrock commented 9 months ago

Same error in TYPO3 11.5.31 with flux 10.0.6. If I set extension setting pageIntegration=0, then the problem disappears.

xellos866 commented 9 months ago

we patched it as followed: (this is related to: #2138 )

Classes/Service/PageService.php:

@@ -59,7 +59,7 @@
- public function getPageTemplateConfiguration(int $pageUid): ?array
+ public function getPageTemplateConfiguration(?int $pageUid): ?array

Classes/Provider/PageProvider.php

@@ -84,7 +84,7 @@
-        $pageTemplateConfiguration = $this->pageService->getPageTemplateConfiguration($row['uid']);
+        $pageTemplateConfiguration = $this->pageService->getPageTemplateConfiguration((int)$row['uid']);