Bug #88768
closedl10n_parent as group field breaks backend
100%
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@
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
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
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
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
Updated by Markus Klein about 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 84c6dccc18b724a914fadb73cd45a187b799d1b9.