Bug #86493
openLocalizationStateSelector does not check if $localizationState is a TYPO3\CMS\Core\DataHandling\Localization\State object
0%
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.