Bug #82970

Page tree reload is triggered to early

Added by Nicole Cordes 9 months ago. Updated 5 months 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


Related issues

Related to TYPO3 Core - Bug #84294: Pagetree reload every time after delete, pasteInto, disable and enable Resolved 2018-03-15

Associated revisions

Revision 17136ee9 (diff)
Added by Tymoteusz Motylewski 7 months 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 <>

Revision 031dd2c7 (diff)
Added by Andreas Fernandez 5 months ago

[BUGFIX] Unbind load event after page tree refresh

When an action in the page tree is called via the context menu that
enforces a reload of the page tree, the tree is reloaded every time once
the content container is refreshed.

Change the event binding to use `one` to unbind automatically once the
tree was reloaded.

Resolves: #84294
Related: #82970
Releases: 8.7
Change-Id: Ife69dfbceb602a0d610397f313ea539fd9b93711
Reviewed-on: https://review.typo3.org/56170
Reviewed-by: Frank Naegler <>
Tested-by: Frank Naegler <>
Tested-by: TYPO3com <>
Reviewed-by: Benjamin Kluge <>
Tested-by: Benjamin Kluge <>

History

#1 Updated by Tymoteusz Motylewski 9 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 8 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 8 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 7 months ago

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

#5 Updated by Benjamin Kluge 5 months ago

Tymoteusz Motylewski wrote:

Applied in changeset 17136ee9f2bfc29268b1676a56f96eb6d97b59aa.

This patch reloads the page tree on every load event. To reproduce disable a page and then edit a content element. The Page tree reloads on every button click on the main frame. The load event should be removed after execution.

#6 Updated by Benjamin Kluge 5 months ago

i opened a new bug #84294 and committing now a patch

#7 Updated by Andreas Fernandez 5 months ago

  • Related to Bug #84294: Pagetree reload every time after delete, pasteInto, disable and enable added

Also available in: Atom PDF