Bug #102904
closedIRRE exception if child record has not foreign_table
100%
Description
When I create a child record for an IRRE element of the parent table, then an exception is thrown.
*'Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1476107295: PHP Warning: Undefined array key "foreign_table" in /var/www/html/develop12/dev12/vendor/typo3/cms-backend/Classes/Controller/FormInlineAjaxController.php line 123 *
https://github.com/franzholz/party/blob/master/Configuration/TCA/tx_party_parties.php
When a new electronic_address_identifier is generated, then the child table tx_party_electronic_address_identifier_usages is used for this. The TCA of this child table is
'electronic_address_identifier' => [
'exclude' => 1,
'label' => 'LLL:EXT:party/Resources/Private/Language/locallang_db.xlf:tx_party_electronic_address_identifier_usages.electronic_address_identifier',
'config' => [
'type' => 'group',
'internal_type' => 'db',
'allowed' => 'tx_party_electronic_address_identifiers',
'size' => 1,
'minitems' => 0,
'maxitems' => 1,
'default' => 0,
],
According to the docs there is no requirement for a 'foreign_table' for a type = 'group'.
See
Updated by Franz Holzinger 10 months ago
It will work if you add these lines after the if statement to the file vendor/typo3/cms-backend/Classes/Controller/FormInlineAjaxController.php **
if (($parentConfig['foreign_selector'] ?? false) &&
($parentConfig['appearance']['useCombination'] ?? false)
) {
if (empty($childData['processedTca']['columns'][$parentConfig['foreign_selector']]['config']['foreign_table'])) {
$childData['processedTca']['columns'][$parentConfig['foreign_selector']]['config']['foreign_table'] = $childData['processedTca']['columns'][$parentConfig['foreign_selector']]['config']['allowed'];
}
Updated by Gerrit Code Review 10 months ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82721
Updated by Gerrit Code Review 10 months ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82721
Updated by Gerrit Code Review 10 months ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82721
Updated by Gerrit Code Review 10 months ago
Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82721
Updated by Gerrit Code Review 10 months ago
Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82721
Updated by Gerrit Code Review 10 months ago
Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82721
Updated by Gerrit Code Review 9 months ago
Patch set 7 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82721
Updated by Gerrit Code Review 9 months ago
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82994
Updated by Oliver Bartsch 9 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset ba98787952af67965c07ef9f3a71191d784e017a.