Project

General

Profile

Actions

Bug #104147

closed

Info of inline record doesn't work when current module is opened within a new tab

Added by Daniel Gohlke 29 days ago. Updated 13 days ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
Backend JavaScript
Target version:
Start date:
2024-06-18
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
13
PHP Version:
Tags:
Complexity:
medium
Is Regression:
Sprint Focus:

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)

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #99467: Error on opening infowindow of referenced recordsClosed2023-01-05

Actions
Related to TYPO3 Core - Bug #99695: Info Button does not work in edit PopupClosed2023-01-24

Actions
Actions #1

Updated by Daniel Gohlke 29 days ago

  • Status changed from New to In Progress
Actions #2

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 .

Actions #3

Updated by Daniel Gohlke 29 days ago

Perhaps this will also resolves #99467 and #99695.

Actions #4

Updated by Daniel Gohlke 29 days ago

  • Related to Bug #99467: Error on opening infowindow of referenced records added
Actions #5

Updated by Daniel Gohlke 29 days ago

  • Related to Bug #99695: Info Button does not work in edit Popup added
Actions #6

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

Actions #7

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

Actions #8

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

Actions #9

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

Actions #10

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

Actions #11

Updated by Daniel Gohlke 28 days ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #12

Updated by Benni Mack 13 days ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF