Bug #104147
closedInfo of inline record doesn't work when current module is opened within a new tab
100%
Description
What steps are needed to reproduce the bug?
- Go to page module
- Go to page
- Create a content element with an reference (e.g. Text & Images) and add an reference
- Click on i button of the reference (this should work)
- Open the view in a new tab/window via the button in upper right corner.
- Click on i button of the reference (this wont work)
Updated by Daniel Gohlke 29 days ago
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 .
Updated by Daniel Gohlke 29 days ago
- Related to Bug #99467: Error on opening infowindow of referenced records added
Updated by Daniel Gohlke 29 days ago
- Related to Bug #99695: Info Button does not work in edit Popup added
Updated by Gerrit Code Review 29 days ago
- Status changed from In Progress 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/+/84779
Updated by Gerrit Code Review 29 days 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/+/84779
Updated by Gerrit Code Review 28 days 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/+/84779
Updated by Gerrit Code Review 28 days 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 28 days 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 28 days ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset f96dded6e5805824d67329ba321b238360789f64.