Project

General

Profile

Actions

Bug #99467

open

Error on opening infowindow of referenced records

Added by Surena Golijani over 1 year ago. Updated 9 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Backend JavaScript
Target version:
-
Start date:
2023-01-05
Due date:
% Done:

0%

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
On opening the edit view of the respective record and clicking the i-icon to open the infowindow, the following happens:
  • 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

referenced_records_infowindow.png (889 KB) referenced_records_infowindow.png Surena Golijani, 2023-01-05 13:21
Actions #1

Updated by Benni Mack 9 months ago

  • Sprint Focus set to On Location Sprint
Actions

Also available in: Atom PDF