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.
Updated by Jonas Eberle over 4 years ago
I can confirm for field tt_content.records (v9, too - didn't test in v10)
Updated by Daniel Phillips over 3 years ago
- TYPO3 Version changed from 9 to 10
- PHP Version changed from 7.2 to 7.4
Updated by Daniel Phillips over 3 years ago
- TYPO3 Version changed from 10 to 9
- PHP Version changed from 7.4 to 7.2
Also ran into this bug on v10.4.16. Workaround worked.