CodersCare / gridelements

Be part of the future of TYPO3! Support Gridelements now and unlock exclusive early access to v13! The well-established Gridelements V12 elevates TYPO3 by bringing grid-based layouts to content elements, with powerful features like advanced drag & drop and real references. Supercharge your workflow and make daily tasks easier. Sponsor us here:
https://coders.care/for/crowdfunding/gridelements
GNU General Public License v3.0
5 stars 25 forks source link

Error ::getPageInfo(): Return value must be of type array, null returned #73

Closed matin73 closed 3 months ago

matin73 commented 3 months ago

I get error in combination with extension frontend_editing in TYPO3 11 (PHPH 7.4 and PHP 8x): TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController::getPageInfo(): Return value must be of type array, null returned in /usr/local/www/bbbb/xxx/typo3/sysext/backend/Classes/Controller/ContentElement/NewContentElementController.php line 523

at TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController->getPageInfo() in /usr/local/www/apache24/xxx/xxx/typo3conf/ext/gridelements/Classes/Hooks/WizardItems.php line 71 { if (!$this->getBackendUser()->checkAuthMode('tt_content', 'CType', 'gridelements_pi1', $GLOBALS['TYPO3_CONF_VARS']['BE']['explicitADmode'])) { return; } $pageInfo = $parentObject->getPageInfo(); $pageId = (int)$pageInfo['uid']; $this->init($pageId);

    $container = (int)GeneralUtility::_GP('tx_gridelements_container');
Bunnyfield commented 3 months ago

Hi @matin73 thanks for the report, but it seems that we can't do anything about it from the Gridelements side:

Neither the getPageInfo() method, nor the NewContentElementController are provide by Gridelements. So there is no way to change the behaviour of those methods.

That's why I will close the issue here and recommend checking either the frontend_editing extension or the core for possible bugs.

AFAICS the core provides either the page access information or an empty array, so I guess the culprit should be frontend_editing in this case.

Feel free to reopen the issue, if you found other evidence.