The problem is located in https://github.com/TYPO3/typo3/blob/main/typo3/sysext/backend/Resources/Public/JavaScript/info-window.js :
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
import {
SeverityEnum
}
from'@typo3/backend/enum/severity.js';
import Modal from'@typo3/backend/modal.js';
class InfoWindow {
static showItem(o, e) {
Modal.advanced({
type: Modal.types.iframe,
size: Modal.sizes.large,
content: top.TYPO3.settings.ShowItem.moduleUrl + '&table=' + encodeURIComponent(o) + '&uid=' + ('number' == typeof e ? e : encodeURIComponent(e)),
severity: SeverityEnum.notice
})
}
}
top.TYPO3.InfoWindow ||
(top.TYPO3.InfoWindow = InfoWindow),
TYPO3.InfoWindow = InfoWindow;
export default InfoWindow;
Here top.TYPO3.settings.ShowItem.moduleUrl is accessed in line 23. However, ShowItem is undefined in new Window (perhaps in modal as well).
One solution would be to add the line
$pageRenderer->addInlineSetting('ShowItem', 'moduleUrl', (string)$this->uriBuilder->buildUriFromRoute('show_item'));
from https://github.com/TYPO3/typo3/blob/v13.1.1/typo3/sysext/backend/Classes/Controller/BackendController.php#L141 after https://github.com/TYPO3/typo3/blob/v13.1.1/typo3/sysext/backend/Classes/Controller/EditDocumentController.php#L802.
The other approach from my point of view would be to move top.TYPO3.settings.ShowItem into a condition and, if top.TYPO3.settings.ShowItem is undefined, check if window.opener.settings.ShowItem is available and then get the moduleUrl from it.
In discussion with Andreas Kienast, I would add a patch that sets the corresponding inline setting for Javascript is set in the EditDocumentController .