-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.3.0
-
-
MOODLE_403_STABLE
-
Moodle Apps - 2024 i2.3, Moodle Apps - 2024 i3.2
To reproduce it:
- Login in a site with a remote them.
- Open user menu and click "Log out".
- Go offline.
- Try to open the site again. In the reconnect screen, the remote theme won't be loaded when it should.
The problem is that, when reconnecting to a site, the app treats it as a new site so it uses the online URL to load the styles (loadTmpStyles). Since you're offline, the online URL doesn't work. It should use the site ID to retrieve the local file.
I tried to fix this in this PullRequest:
https://github.com/moodlehq/moodleapp/pull/4078
But this fix caused another issue: if the user then reconnects using QR login or biometric, the remote theme and basic branding were lost after login.
The problem in that case was that, when using those login methods, the event LOGIN_SITE_UNCHECKED is triggered with loginSuccessful=false (because the page doesn't know that the user has logged in), so the app removed all the styles when it shouldn't.
Since there are several different cases here and it's easy to break a different case when fixing another (as I did), I decided to revert the previous fix and open this issue so we can look at it carefully. This is the revert PR: