Bug #82970

Page tree reload is triggered to early

Added by Nicole Cordes 3 months ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Pagetree
Start date:
2017-11-10
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Given:

- a page with many records and references to sys_categories
- delete that page by using the context menu

Expectation:

- delete process is started
- after everything is done (can take longer because of relations und sys_reference changes), the tree should be reloaded, the page should be removed

Actual:

- the page tree is reloaded immediately, as the page record is not yet deleted the page is still visible

Associated revisions

Revision 17136ee9 (diff)
Added by Tymoteusz Motylewski about 1 month ago

[BUGFIX] Refresh page tree after context menu actions are completed

Instead of hardcoded 500ms delay, context menu actions refresh page tree
as soon as the operation is completed.

Releases: 8.7
Resolves: #82970
Change-Id: I697a35a6152bd7c58a4702ab1288ab55c32f9029
Reviewed-on: https://review.typo3.org/55233
Tested-by: TYPO3com <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>
Reviewed-by: Andreas Fernandez <>
Tested-by: Andreas Fernandez <>

History

#1 Updated by Tymoteusz Motylewski 3 months ago

this is caused probably by the
.defer(500) in the ContextMenuActions.js

currently is (in v8):

top.TYPO3.Backend.ContentContainer.setUrl(
     top.TYPO3.settings.RecordCommit.moduleUrl + ....
    );
      if (table === 'pages' && top.TYPO3.Backend.NavigationContainer.PageTree) {
        top.TYPO3.Backend.NavigationContainer.PageTree.refreshTree.defer(500);
     }

But should be (this is already fixed in 9)
top.TYPO3.Backend.ContentContainer.setUrl(
      top.TYPO3.settings.RecordCommit.moduleUrl + '&redirect=' + ContextMenuActions.getReturnUrl() ...
         ).done(function () {
      if (table === 'pages' && top.TYPO3.Backend.NavigationContainer.PageTree) {
           top.TYPO3.Backend.NavigationContainer.PageTree.refreshTree();
         }
      });

It was changed in 9 in here:
https://review.typo3.org/#/c/51594/113/typo3/sysext/backend/Resources/Public/JavaScript/ContextMenuActions.js

#2 Updated by Gerrit Code Review about 2 months ago

  • Status changed from New to Under Review

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55233

#3 Updated by Gerrit Code Review about 2 months ago

Patch set 2 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55233

#4 Updated by Tymoteusz Motylewski about 1 month ago

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

Also available in: Atom PDF