Project

General

Profile

Actions

Bug #98306

closed

PHP Warning: Undefined array key "tt_content_defValues"

Added by Franz Holzinger over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2022-09-08
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.0
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:

Description

After creating a new extension by Extension Builder, the TYPO3 page module gives this error:

(1/1) #1476107295 TYPO3\CMS\Core\Error\Exception
PHP Warning: Undefined array key "tt_content_defValues." in /var/www/html/sources/typo3_src-11.5.14/typo3/sysext/backend/Classes/Controller/ContentElement/NewContentElementController.php line 373

NewContentElementController.php:

    protected function getWizardItem(array $itemConf): array
    {
        $itemConf['title'] = $this->getLanguageService()->sL($itemConf['title']);
        $itemConf['description'] = $this->getLanguageService()->sL($itemConf['description']);
        $itemConf['saveAndClose'] = (bool)($itemConf['saveAndClose'] ?? false);
        $itemConf['tt_content_defValues'] = $itemConf['tt_content_defValues.'];
        unset($itemConf['tt_content_defValues.']);
        return $itemConf;
    }

Bug fix:

$itemConf['tt_content_defValues'] = $itemConf['tt_content_defValues.'] ?? [];

(1/1) #1476107295 TYPO3\CMS\Core\Error\Exception
PHP Warning: Undefined array key "select_key" in /var/www/html/sources/typo3_src-11.5.14/typo3/sysext/backend/Classes/Controller/ContentElement/NewContentElementController.php line 429
if (is_array($GLOBALS['TCA']['tt_content']['columns'][$fN])) {

bugfix:

if (isset($GLOBALS['TCA']['tt_content']['columns'][$fN]) && is_array($GLOBALS['TCA']['tt_content']['columns'][$fN])) {

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #97201: Add new event to modify the new content element wizard itemsClosedOliver Bartsch2022-03-17

Actions
Actions

Also available in: Atom PDF