Project

General

Profile

Actions

Bug #88768

closed

l10n_parent as group field breaks backend

Added by Markus Klein over 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
Backend API
Target version:
-
Start date:
2019-07-15
Due date:
% Done:

100%

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

Description

Editing a translated record, where the l10n_parent is defined as group field in TCA (for performance reasons) leads to an exception in the backend IF the record in this very table with UID 1 does NOT exist.

The reason is the \TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseLanguageRows class which relies on $result['databaseRow']['l10n_parent'] being a string/int.

In case of being defined as group field the l10n_parent is an array since the Form Engine refactoring.
As this $result['databaseRow']['l10n_parent'] is cast to an integer, the class subsequently tries to work on UID 1. (there is always exactly 1 element in the array)

TCA

        'l10n_parent' => [
            'displayCond' => 'FIELD:sys_language_uid:>:0',
            'exclude' => false,
            'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
            'config' => [
                'type' => 'group',
                'internal_type' => 'db',
                'allowed' => 'tx_myext_domain_model_location',
                'size' => 1,
                'maxitems' => 1,
                'minitems' => 0,
            ],
        ],

Error message:

Default language record with id 1 not found in table tx_myext_domain_model_location while editing record 1234@


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #77301: FormEngine must handle l10n_parent fields correctly even if not a selectClosedMarkus Klein2016-07-29

Actions
Actions #1

Updated by Gerrit Code Review over 5 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61301

Actions #2

Updated by Gerrit Code Review over 5 years ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61302

Actions #3

Updated by Markus Klein over 5 years ago

  • Related to Bug #77301: FormEngine must handle l10n_parent fields correctly even if not a select added
Actions #4

Updated by Gerrit Code Review over 5 years ago

Patch set 2 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61302

Actions #5

Updated by Markus Klein about 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by Benni Mack almost 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF