[BUGFIX] Pagetree broken due to JavaScript exception
authorSteffen Ritter <info@rs-websystems.de>
Tue, 18 Oct 2011 11:44:51 +0000 (13:44 +0200)
committerXavier Perseguers <xavier@typo3.org>
Tue, 18 Oct 2011 12:12:31 +0000 (14:12 +0200)
Sometimes (especially with empty DB Mount) the Pagetree is broken and stops with a JavaScript Exception.

This is due to some problems with the state-restore logic, where the state of not-yet-rendered nodes is applied.

Change-Id: Ic9ac5792272b3bc6b2907149a93cd7c22649c317
Fixes: #28687
Releases: 4.6
Reviewed-on: http://review.typo3.org/5958
Reviewed-by: Björn Pedersen
Tested-by: Björn Pedersen
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
t3lib/js/extjs/components/pagetree/javascript/Ext.ux.state.TreePanel.js

index 29912f0..348d94c 100644 (file)
@@ -93,7 +93,7 @@ Ext.override(Ext.ux.state.TreePanel, {
                                                                fn: this.restoreState
                                                        }
                                                });
-                                               if (pageNode.expanded === false) {
+                                               if (pageNode.expanded === false && pageNode.rendered == true) {
                                                        pageNode.expand();
                                                }
                                        }