[BUGFIX] Pagetree: Copying large branches duplicates branch
authorSteffen Gebert <steffen.gebert@typo3.org>
Sat, 11 Feb 2012 15:52:03 +0000 (16:52 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 21 May 2012 21:05:55 +0000 (23:05 +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: I133566bf12c7511f7e8ef9cb9e6ff8683f07249c
Resolves: #26993
Releases: 6.0, 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/11336
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
t3lib/js/extjs/components/pagetree/javascript/actions.js
t3lib/js/extjs/components/pagetree/javascript/tree.js

index df9875b..3bcbbf4 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);
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 {