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 about 6 years ago. Updated over 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 #1

Updated by Jonas Eberle over 4 years ago

I can confirm for field tt_content.records (v9, too - didn't test in v10)

Actions #2

Updated by Daniel Phillips over 3 years ago

  • TYPO3 Version changed from 9 to 10
  • PHP Version changed from 7.2 to 7.4
Actions #3

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.

Actions

Also available in: Atom PDF