Project

General

Profile

Actions

Task #104964

open

Column-selector-button and clipboard-panel reload the whole TYPO3-backend instead of just updating the content-frame

Added by Ayke Halder 2 months ago. Updated 2 months ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
Backend JavaScript
Target version:
-
Start date:
2024-09-13
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
13
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

I'd like to refactor backend/column-selector-button and backend/clipboard-panel to implement a proper reload of the typo3-contentIframe instead of reloading the whole TYPO3-backend.

The proper reload can be done by using backend/viewport/content-container functions ContentContainer.setUrl(). This relies on backend/module/router and thereby triggers `NProgress` and gives this nice loading-bar above the typo3-contentIframe.

backend/viewport/content-container relies on backend/module/router and backend/module/iframe.

(I don't know why 'ContentContainer.setUrl() does not make use of backend/module/router - but that is a new ticket.)


General issue with iframe reloads and anchors

An iframe (and also the main window) does not get reloaded if the new url contains an anchor and the old and new url are otherwise identical.
This must be fixed in and backend/module/iframe and and backend/viewport/content-container


Current implementation for 'full backend reload' in backend/column-selector-button

https://github.com/TYPO3/typo3/blob/35c9b96336d8644b52ef9045969a47475f559da5/Build/Sources/TypeScript/backend/column-selector-button.ts#L207-L209

// @todo This does not jump to the anchor (#t3-table-some_table) after the reload!!!
this.ownerDocument.location.href = this.modalTarget;
this.ownerDocument.location.reload();

E.g. go into the TYPO3-backend and open the dev-tools JS-console:
Iframes show the same behaviour as the main window.

/* First: login in to backend and load module */
window.top.document.getElementById('typo3-contentIframe').ownerDocument.location.href = '/typo3/module/web/list?id=0&table=be_groups';

/* 1: this does not refresh anything */
window.top.document.getElementById('typo3-contentIframe').ownerDocument.location.href = '/typo3/module/web/list?id=0&table=be_groups#t3-table-be_groups';

/* 2: this does not refresh anything */
window.top.document.getElementById('typo3-contentIframe').ownerDocument.location.href = '/typo3/module/web/list?id=0&table=be_groups#t3-table-be_groups';

/* 3: this does neither refresh anything */
window.top.document.getElementById('typo3-contentIframe').ownerDocument.location.href = '/typo3/module/web/list?id=0&table=be_groups#';

/* 4 this triggers the complete reload - and that's how it is implemented in 'backend/column-selector-button' right now */
window.top.document.getElementById('typo3-contentIframe').ownerDocument.location.href = '/typo3/module/web/list?id=0&table=be_groups#t3-table-be_groups';
window.top.document.getElementById('typo3-contentIframe').ownerDocument.location.reload();

/* 5: No anchor set - this always does a complete reload */
window.top.document.getElementById('typo3-contentIframe').ownerDocument.location.href = '/typo3/module/web/list?id=0&table=be_groups';

Related issues 4 (1 open3 closed)

Related to TYPO3 Core - Task #104714: Test 'FileClipboardCest.php:seeAddRemoveMultipleRecords' fails sporadically againClosed2024-08-23

Actions
Related to TYPO3 Core - Task #104702: Test 'FileClipboardCest.php:seeAddRemoveMultipleRecords' fails sporadicallyClosed2024-08-22

Actions
Related to TYPO3 Core - Task #104585: Stabilize FileClipboardCest ac testClosed2024-08-10

Actions
Related to TYPO3 Core - Task #104965: General issue with non-working iframe reloads if url contains anchorUnder Review2024-09-13

Actions
Actions #1

Updated by Ayke Halder 2 months ago

  • Related to Task #104714: Test 'FileClipboardCest.php:seeAddRemoveMultipleRecords' fails sporadically again added
  • Related to Task #104702: Test 'FileClipboardCest.php:seeAddRemoveMultipleRecords' fails sporadically added
  • Related to Task #104585: Stabilize FileClipboardCest ac test added
Actions #2

Updated by Ayke Halder 2 months ago

  • Related to Task #104965: General issue with non-working iframe reloads if url contains anchor added
Actions #3

Updated by Gerrit Code Review 2 months ago

  • Status changed from New 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/+/86112

Actions #4

Updated by Gerrit Code Review 2 months 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/+/86112

Actions #5

Updated by Gerrit Code Review 2 months 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/+/86112

Actions #6

Updated by Gerrit Code Review 2 months ago

Patch set 4 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/+/86112

Actions

Also available in: Atom PDF