Bug #80312

TYPO3 backend broken after a re-login

Added by Josef Glatz about 2 years ago. Updated 8 months ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
Backend User Interface
Start date:
2017-03-17
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
7.1
Tags:
JavaScript
Complexity:
hard
Is Regression:
No
Sprint Focus:

Description

Problem/Description

In a project, where we started with TYPO3 master ~8.5.0-dev we often get a broken TYPO3 backend after a re-login is necessary.

Scenario

In my case, this happens in following scenario:
  1. Im logged in in the backend
  2. My IP changes
  3. The login screen appears
  4. Login process works as expected
  5. At first glance all looks fine when the backend ui gets loaded

but then

  1. the last/starting module
  2. or pagetree could not be loaded

However better than a Windows bluescreen, it looks like the following screenie (project name/Logo grayed out)

Screenshot of Backend + DevTools Console Output

The console log as text:

/typo3/sysext/backend/Resources/Public/JavaScript/Viewport.js?bust=411d72e16a44c31551ef7434f3a9b4ca1205202b:120 Uncaught TypeError: Cannot read property 'contentWindow' of undefined
    at /typo3/sysext/backend/Resources/Public/JavaScript/Viewport.js?bust=411d72e16a44c31551ef7434f3a9b4ca1205202b:120
    at Object.execCb (require-98fc40774edc8a5fe2909f2c012d4c8f.js:1)
    at t.check (require-98fc40774edc8a5fe2909f2c012d4c8f.js:1)
    at t.enable (require-98fc40774edc8a5fe2909f2c012d4c8f.js:1)
    at t.init (require-98fc40774edc8a5fe2909f2c012d4c8f.js:1)
    at o (require-98fc40774edc8a5fe2909f2c012d4c8f.js:1)
    at Object.completeLoad (require-98fc40774edc8a5fe2909f2c012d4c8f.js:1)
    at HTMLScriptElement.onScriptLoad (require-98fc40774edc8a5fe2909f2c012d4c8f.js:1)
merged-6bc5661a87ce7c5cb42537a1c10a8eab-740b001d6533ba5bb7b6a194642b928d.js:3962 Uncaught TypeError: Cannot read property 'App' of undefined
    at merged-6bc5661a87ce7c5cb42537a1c10a8eab-740b001d6533ba5bb7b6a194642b928d.js:3962

What if you click on a module in the module menu (e.g. Web > Page Module)

The page module opens, but not within the frame

Actual workaround

Manually reloading the whole TYPO3 backend before clicking on a module. (In some cases, that's not enough. If a simple reload doesn't work, an editor could click on a module, then press back button in the browser)

ToDo(s)

  • ?

Acceptance Criteria

*

870dev-bug-after-logout.png View - Screenshot of Backend + DevTools Console Output (248 KB) Josef Glatz, 2017-03-17 08:23

click-on-pagemodule.png View (65.2 KB) Josef Glatz, 2017-03-17 08:23

broken_backend.jpg View (97.8 KB) Christoph Bessei, 2017-07-12 16:39

broken_backend_2.jpg View (98.6 KB) Christoph Bessei, 2017-07-14 17:39

backend_broken.jpg View (91.9 KB) Christoph Bessei, 2018-01-03 11:31

backend_broken2.jpg View (179 KB) Christoph Bessei, 2018-01-03 11:31


Related issues

Related to TYPO3 Core - Bug #80366: Values aren't always saved in the TYPO3 backend Closed 2017-03-21

Associated revisions

Revision e81f08c1 (diff)
Added by Oliver Hader 10 months ago

[BUGFIX] Streamline backend module menu and viewport initialization

ModuleMenu and Viewport initialization need to be defered to ensure
that DOM is available in order to apply further behavior in mentioned
client implementation.

Resolves: #80312
Releases: master, 8.7
Change-Id: I9581a7f2164050f73683928b8f2ebe1d69a6d5e7
Reviewed-on: https://review.typo3.org/57526
Tested-by: TYPO3com <>
Reviewed-by: Andreas Fernandez <>
Tested-by: Andreas Fernandez <>
Reviewed-by: Jigal van Hemert <>
Reviewed-by: Frank Naegler <>
Tested-by: Frank Naegler <>

Revision 1778ad8d (diff)
Added by Oliver Hader 10 months ago

[BUGFIX] Streamline backend module menu and viewport initialization

ModuleMenu and Viewport initialization need to be defered to ensure
that DOM is available in order to apply further behavior in mentioned
client implementation. Besides that, property 'iframe' is extended by
a JavaScript getter - otherwise directly assigning another property of
an undefined object will fail.

Resolves: #80312
Releases: master, 8.7
Change-Id: I9581a7f2164050f73683928b8f2ebe1d69a6d5e7
Reviewed-on: https://review.typo3.org/57527
Tested-by: TYPO3com <>
Reviewed-by: Andreas Fernandez <>
Tested-by: Andreas Fernandez <>
Reviewed-by: Frank Naegler <>
Tested-by: Frank Naegler <>

History

#1 Updated by Josef Glatz about 2 years ago

  • Subject changed from TYPO3 backend often broken after re-login is necessary to TYPO3 backend often broken after a re-login

#2 Updated by Josef Glatz about 2 years ago

  • Description updated (diff)

#3 Updated by Josef Glatz about 2 years ago

  • Subject changed from TYPO3 backend often broken after a re-login to TYPO3 backend broken after a re-login

#4 Updated by Christopher Orth about 2 years ago

Same problem here, you can also reproduce with the following steps:
  1. Logout from the Backend
  2. Go to the login mask /typo3/
  3. Insert username & password
  4. Press the Login Button and directly change your browsertab now
  5. Wait a few seconds (4-5 seconds to be sure) and tab back to the TYPO3 Backend

You now have the same view you can see on the original screenshot 1 here. The right frame could not be loaded.
If you now click on "Page" - for example - the module is loaded but not in a frame, same behaviour as you can see on screenshot 2.

#5 Updated by Josef F. Glatz (Old User) about 2 years ago

Another - to me - relevant scenario

  1. I logged in into dev-master with Google Chrome Version 57.0.2987.98 (64-bit) (Mac) as admin (where no 3rd party ext except my theme ext is active which don't add any backend js or css)
  2. Clicked on EM
  3. Extension Manager was then opened like target="_top"

(This was not reproducable; Was first visit with that browser on that TYPO3 instance; 150/30 Inet connection)

#6 Updated by Frank Naegler about 2 years ago

  • Description updated (diff)

#7 Updated by Jigal van Hemert about 2 years ago

Is this still reproducible with current master? I tried it with Chrome and Firefox on windows and even with throttling on there was no issue.

#8 Updated by Christian Kuhn about 2 years ago

  • Target version deleted (8 LTS)
  • Sprint Focus deleted (Stabilization Sprint)

#9 Updated by Christopher Orth about 2 years ago

I can still reproduce that the same way I wrote with the current master.
If you can't reproduce it that way, try to sign in / sign out a few times and then follow these steps.

Let me know if you need further informations.

#10 Updated by Abin Sabu about 2 years ago

  • File Screenshot from 2017-04-18 15-11-36.png added
  • Target version set to 8 LTS
  • PHP Version set to 7.1
  • Tags set to Backed JS Errors

#11 Updated by Abin Sabu about 2 years ago

  • File deleted (Screenshot from 2017-04-18 15-11-36.png)

#12 Updated by Markus Klein about 2 years ago

  • Target version changed from 8 LTS to Candidate for patchlevel

#13 Updated by Josef Glatz about 2 years ago

TYPO3 8.7.1 stable still affected

#14 Updated by Benjamin Kott almost 2 years ago

  • Sprint Focus set to On Location Sprint

#15 Updated by Benjamin Kott almost 2 years ago

  • Status changed from New to Accepted

#16 Updated by Oliver Hader almost 2 years ago

  • Tags changed from Backed JS Errors to JavaScript

#17 Updated by Markus Sommer almost 2 years ago

  • Assignee set to Markus Sommer

#18 Updated by Arun Chandran almost 2 years ago

I can reproduce the issue all the time with TYPO3 8.7.2. Any patch available for this issue?

#19 Updated by ILYA almost 2 years ago

Reproduce issue:
Chromium > Developer Tools > Network > GPRS throttling (50kb/s) + open record with RTE

No issue:
Chromium > Developer Tools > Network > Disable cache

Solution:
BE compression level = 9

It seems disk cache issue in Chromium. JS compression helps, but still not a solution for a low internet speed.

#20 Updated by Markus Klein almost 2 years ago

  • Complexity set to hard

#21 Updated by Christoph Bessei almost 2 years ago

I had a broken backend after login today, but with another JS error.

#22 Updated by Markus Klein almost 2 years ago

@Bessei: Please update to v8.7.3 first. You lack some 200+ bugfixes in 8.7.1.

#23 Updated by Arun Chandran almost 2 years ago

Reproducible in TYPO3 8.7.3. The backend is broken and also the sys_category tree not loading sometimes. I think all these issues are related.

#24 Updated by Christoph Bessei almost 2 years ago

@Markus Klein I know, but the bug is hard to reproduce so I think it's useful to collect all errors with the same result (= broken backend).

I had another error using the 8.7 branch (8.7.4-dev), but I also had this error in 8.5.
The code in app.js is the following:

    /**
     * Initializes the application
     *
     * Set's the necessary language labels, configuration options and sprite icons by an
     * external call and initializes the needed components.
     *
     * @return {void}
     */
    initComponent: function() {
        TYPO3.Components.PageTree.DataProvider.loadResources(function(response) {
            TYPO3.Components.PageTree.LLL = response['LLL'];
            TYPO3.Components.PageTree.Configuration = response['Configuration'];
            TYPO3.Components.PageTree.Icons = response['Icons'];
TYPO3.Components.PageTree.DataProvider.loadResources(function(response) {

is line 82

Browser/OS: Firefox ESR 52.2.1 (64-Bit), Ubuntu 16.04

#25 Updated by Anja Leichsenring over 1 year ago

  • Sprint Focus deleted (On Location Sprint)

#26 Updated by Florian Rival over 1 year ago

Same problem for me with TYPO3 CMS 8.7.8 : only top bar and left bar are displayed when I'm login.
I'm also with a dynamic IP.
Same problem when I want to log in the install tool.

Removing this cookie "be_lastLoginProvider" seems to solve the problem with Firefox.

#27 Updated by Sebastien Michel over 1 year ago

Experienced the exact same issue with broken backend in TYPO3 8.7.7 after re-login (only left pane is visible).
The only way to fix this is to clear the browsers cache before re-login.
Can reproduce on Firefox 57.0 and Chrome 62.0

This is what I get in the debug Console:

TypeError: $(...)[0] is undefined    Viewport.js:127:15

<anonymous>  https://mydomain/typo3/sysext/backend/Resources/Public/JavaScript/Viewport.js:127:15
execCb       https://mydomain/typo3temp/assets/compressed/require-684ca2d77dd313b71087737baa0681c7.js:1:12895
check        https://mydomain/typo3temp/assets/compressed/require-684ca2d77dd313b71087737baa0681c7.js:1:6631
enable       https://mydomain/typo3temp/assets/compressed/require-684ca2d77dd313b71087737baa0681c7.js:1:9376
init         https://mydomain/typo3temp/assets/compressed/require-684ca2d77dd313b71087737baa0681c7.js:1:5733
o            https://mydomain/typo3temp/assets/compressed/require-684ca2d77dd313b71087737baa0681c7.js:1:4285
completeLoad https://mydomain/typo3temp/assets/compressed/require-684ca2d77dd313b71087737baa0681c7.js:1:12126
onScriptLoad https://mydomain/typo3temp/assets/compressed/require-684ca2d77dd313b71087737baa0681c7.js:1:13050

#28 Updated by Sebastien Michel over 1 year ago

It appears that the problem was transient. Can this be related to a slight latency we had on the network earlier? Does this have anything to do with the compression level?

#29 Updated by Christoph Bessei over 1 year ago

Still exists in 8.7.9 (and happens even without compression)

#30 Updated by Sebastian Wagner over 1 year ago

When using firefox-esr 52.6.0esr-1~deb9u1 this happens to me as well:

TypeError: TYPO3.Components.PageTree.DataProvider is undefined
TYPO3.Components.PageTree.App<.initComponent
Ext.Component
.extend</&lt;/T<
.extend</&lt;/T<
.extend</&lt;/T<
.extend</&lt;/T<
TYPO3.ModuleMenu.App.loadNavigationComponent
TYPO3.ModuleMenu.App.loadModuleComponents
TYPO3.ModuleMenu.App.showModule
TYPO3.ModuleMenu.App.initialize
&lt;anonym&gt;
newContext/u.execCb
newContext/t.prototype.check
newContext/t.prototype.enable/</<
bind/<
newContext/t.prototype.emit/<
each
newContext/t.prototype.emit
newContext/t.prototype.check
newContext/t.prototype.enable
newContext/t.prototype.init
o
newContext/u.completeLoad
newContext/u.onScriptLoad

But with a clean profile

firefox -ProfileManager -no-remote

I did not have this error.
So one remedy was disabling all extensions in the original profile.
Also whitelisting uMatrix completely did not help here.

#31 Updated by Gerrit Code Review 11 months ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57526

#32 Updated by Gerrit Code Review 11 months ago

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/57527

#33 Updated by Oliver Hader 11 months ago

In TYPO3 8.7.16 it's enough to log into the backend and then reload the whole view once (with having browser console collapsed).

#34 Updated by Oliver Hader 10 months ago

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

#35 Updated by Benni Mack 8 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF