Fixed bug #13828: Login cause JS error if not in frame (access to parent is not allowed)
authorSteffen Kamper <info@sk-typo3.de>
Thu, 8 Apr 2010 10:54:45 +0000 (10:54 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Thu, 8 Apr 2010 10:54:45 +0000 (10:54 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7256 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/index.php

index 3a06ee8..3682ccd 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2010-04-08  Steffen Kamper  <info@sk-typo3.de>
 
+       * Fixed bug #13828: Login cause JS error if not in frame (access to parent is not allowed)
        * Added feature #12818: Feature: border class is hardcoded  [css styled content] (thanks to Susanne Moog)
        * Fixed bug #13693: Backend doesn't use pageRenderer methods
 
index e050cc4..5b14a54 100644 (file)
@@ -653,8 +653,13 @@ class SC_index {
                $JSCode .= $GLOBALS['TBE_TEMPLATE']->wrapScriptTags('
                        function startUp() {
                                        // If the login screen is shown in the login_frameset window for re-login, then try to get the username of the current/former login from opening windows main frame:
-                               if (parent.opener && parent.opener.TS && parent.opener.TS.username && document.loginform && document.loginform.username)        {
-                                       document.loginform.username.value = parent.opener.TS.username;
+                               try {
+                                       if (parent.opener && parent.opener.TS && parent.opener.TS.username && document.loginform && document.loginform.username)        {
+                                               document.loginform.username.value = parent.opener.TS.username;
+                                       }
+                               }
+                               catch(error) {
+                                       //continue
                                }
 
                                        // Wait a few millisecons before calling checkFocus(). This might be necessary because some browsers need some time to auto-fill in the form fields