Actions
Bug #99467
closedError on opening infowindow of referenced records
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend JavaScript
Target version:
-
Start date:
2023-01-05
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
11
PHP Version:
8.0
Tags:
Complexity:
Is Regression:
Sprint Focus:
On Location Sprint
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
Actions