Bug #99467
closedError on opening infowindow of referenced records
100%
Description
Error on opening infowindow of referenced records¶
TYPO3 version: 11.5.21
tested on current chrome and firefox
- Record A has an image field
- Record A is referenced in record B
- opening record A directly: the infowindow is shown
- opening record B, then opening a referenced record A and clicking on it's image fields i-icon: JavaScript-error is thrown
I.e. the infowindow opens if the record is opened directly, but not if the record is opened as a referenced record of another record.
This behaviour is reproducable in different TYPO3 installations with different record types.
Example:
Error message:
Chrome:
Uncaught TypeError: Cannot read properties of undefined (reading 'moduleUrl') at i.showItem (InfoWindow.js?bust=c3eda0df4dff79b17d01b36b63ccea5f1f0b26ca:13:206) at HTMLButtonElement.<anonymous> (InlineControlContainer.js?bust=c3eda0df4dff79b17d01b36b63ccea5f1f0b26ca:13:7735) at HTMLDivElement.<anonymous> (RegularEvent.js?bust=c3eda0df4dff79b17d01b36b63ccea5f1f0b26ca:13:364) showItem @ InfoWindow.js?bust=c3eda0df4dff79b17d01b36b63ccea5f1f0b26ca:13 (anonymous) @ InlineControlContainer.js?bust=c3eda0df4dff79b17d01b36b63ccea5f1f0b26ca:13 (anonymous) @ RegularEvent.js?bust=c3eda0df4dff79b17d01b36b63ccea5f1f0b26ca:13
Firefox:
Uncaught TypeError: top.TYPO3.settings.ShowItem is undefined showItem https://domain.tld/typo3/sysext/backend/Resources/Public/JavaScript/InfoWindow.js?bust=c3eda0df4dff79b17d01b36b63ccea5f1f0b26ca:13 registerInfoButton https://domain.tld/typo3/sysext/backend/Resources/Public/JavaScript/FormEngine/Container/InlineControlContainer.js?bust=c3eda0df4dff79b17d01b36b63ccea5f1f0b26ca:13 delegateTo https://domain.tld/typo3/sysext/core/Resources/Public/JavaScript/Event/RegularEvent.js?bust=c3eda0df4dff79b17d01b36b63ccea5f1f0b26ca:13 InfoWindow.js:13:170 showItem https://domain.tld/typo3/sysext/backend/Resources/Public/JavaScript/InfoWindow.js?bust=c3eda0df4dff79b17d01b36b63ccea5f1f0b26ca:13 registerInfoButton https://domain.tld/typo3/sysext/backend/Resources/Public/JavaScript/FormEngine/Container/InlineControlContainer.js?bust=c3eda0df4dff79b17d01b36b63ccea5f1f0b26ca:13 delegateTo https://domain.tld/typo3/sysext/core/Resources/Public/JavaScript/Event/RegularEvent.js?bust=c3eda0df4dff79b17d01b36b63ccea5f1f0b26ca:13
TCA definition of record A's image field:
'images' => [
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.image',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
'images', [
'appearance' => [
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference'
],
'maxitems' => 10,
'foreign_match_fields' => [
'fieldname' => 'images',
'tablenames' => 'tx_abc_domain_model_productcategory',
'table_local' => 'sys_file',
],
'foreign_types' => [
'0' => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
]
]
], $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'])
]
Files
Updated by Daniel Gohlke about 2 months ago
- Related to Bug #104147: Info of inline record doesn't work when current module is opened within a new tab added
Updated by Daniel Gohlke about 2 months ago
Can you check if patching typo3/sysext/backend/Classes/Controller/EditDocumentController.php fix your problem?
Updated by Gerrit Code Review about 2 months ago
- Status changed from New to Under Review
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/+/84779
Updated by Gerrit Code Review about 2 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/+/84754
Updated by Gerrit Code Review about 2 months ago
Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84755
Updated by Daniel Gohlke about 2 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset f96dded6e5805824d67329ba321b238360789f64.