[BUGFIX] Pagetree: Copying large branches duplicates branch
authorSteffen Gebert <steffen.gebert@typo3.org>
Sat, 11 Feb 2012 15:52:03 +0000 (16:52 +0100)
committerSusanne Moog <typo3@susannemoog.de>
Sun, 20 May 2012 13:29:44 +0000 (15:29 +0200)
Copying large branches (500+ pages, depending on the server) has a big
problem: The AJAX request is answered too late (after Ext.Direct
timeout), so Ext.Direct will resend the request. This will copy the
branch once again. So the copied branch appears twice after copying.

The whole process fails with a connection timeout error message and the
user has to reload the page tree.

Change-Id: If0307586ec3196c3c3dedde92cfb6aee07bc9064
Resolves: #26993
Releases: 6.0, 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/8981
Reviewed-by: Stefan Neufeind
Reviewed-by: Stefan Galinski
Reviewed-by: Philipp Gampe
Tested-by: Stefan Galinski
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
t3lib/js/extjs/components/pagetree/javascript/actions.js
t3lib/js/extjs/components/pagetree/javascript/tree.js

index 07dfd09..33f18ae 100644 (file)
@@ -470,6 +470,9 @@ TYPO3.Components.PageTree.Actions = {
                }
 
                if (tree.t3ContextInfo.inCopyMode) {
+                                // This is hard stuff to do. So increase the timeout for the AJAX request
+                       Ext.Ajax.timeout = 3600000;
+
                        var newNode = tree.t3ContextNode = new Ext.tree.TreeNode(tree.t3ContextNode.attributes);
                        newNode.id = 'fakeNode';
                        node.insertBefore(newNode, node.childNodes[0]);
@@ -500,6 +503,9 @@ TYPO3.Components.PageTree.Actions = {
                }
 
                if (tree.t3ContextInfo.inCopyMode) {
+                               // This is hard stuff to do. So increase the timeout for the AJAX request
+                       Ext.Ajax.timeout = 3600000;
+
                        var newNode = tree.t3ContextNode = new Ext.tree.TreeNode(tree.t3ContextNode.attributes);
                        newNode.id = 'fakeNode';
                        node.parentNode.insertBefore(newNode, node.nextSibling);
@@ -779,4 +785,4 @@ TYPO3.Components.PageTree.Actions = {
                        this
                );
        }
-};
\ No newline at end of file
+};
index 7319b02..e071467 100644 (file)
@@ -595,6 +595,10 @@ TYPO3.Components.PageTree.Tree = Ext.extend(Ext.tree.TreePanel, {
                this.t3ContextNode = movedNode;
 
                movedNode.disable();
+
+                       // This is hard stuff to do. So increase the timeout for the AJAX request
+               Ext.Ajax.timeout = 3600000;
+
                if (movedNode.previousSibling) {
                        this.commandProvider.copyNodeAfterDestination(movedNode, this);
                } else {