Project

General

Profile

Actions

Bug #86493

open

LocalizationStateSelector does not check if $localizationState is a TYPO3\CMS\Core\DataHandling\Localization\State object

Added by Georg Tiefenbrunn over 5 years ago. Updated about 3 years ago.

Status:
New
Priority:
Must have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2018-10-01
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

TYPO3 CMS 9.x composer latest master

I use tt_content.image in a custom CE and set 'allowLanguageSynchronization' => true by columnsOverrides:

'columnsOverrides' => [
    'image' => [
        'config' => [
            'behaviour' => [
                'allowLanguageSynchronization' => true,
            ],
...

This leads to:

Error: Call to a member function isCustomState() on null
in ...typo3/sysext/backend/Classes/Form/FieldWizard/LocalizationStateSelector.php line 96

https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/backend/Classes/Form/FieldWizard/LocalizationStateSelector.php#L72 should initialize $localizationState but this fails for field tt_content.image as State::getFieldNames() does not handle columnsOverrides but simply checks if $GLOBALS['TCA']['tt_content']['columns']['image']['config']['behaviour']['allowLanguageSynchronization'] is set.

Must have: LocalizationStateSelector should properly handle the errors if $localizationState is no State object

Could Have: LocalizationStateSelector could also handle fields using columnsOverrides.

Workaround: Set $GLOBALS['TCA']['tt_content']['columns']['image']['config']['behaviour']['allowLanguageSynchronization'] instead of using columnsOverrides.

Actions

Also available in: Atom PDF