Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-4606

Remote themes are not loaded in reconnect when loading a logged out site in offline

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.3.0
    • Remote CSS
    • Hide

      This issue only needs to be tested in 1 device.

      1. In the app, login in a Premium site that has a remote theme. E.g. our 4.3 site has a remote theme that sets the top bar to green and adds the text "[Remote CSS]" to the header.
      2. Enable biometric login for the site when asked for it.
      3. Open user menu and click Logout.
      4. Go offline and click to enter the site. Check that, in the page to enter the password, the remote theme is loaded.
      5. Authenticate using biometric. Check that the remote theme is still loaded after login.
      Show
      This issue only needs to be tested in 1 device. In the app, login in a Premium site that has a remote theme. E.g. our 4.3 site has a remote theme that sets the top bar to green and adds the text " [Remote CSS] " to the header. Enable biometric login for the site when asked for it. Open user menu and click Logout. Go offline and click to enter the site. Check that, in the page to enter the password, the remote theme is loaded. Authenticate using biometric. Check that the remote theme is still loaded after login.
    • MOODLE_403_STABLE
    • Moodle Apps - 2024 i2.3, Moodle Apps - 2024 i3.2

      To reproduce it:

      1. Login in a site with a remote them.
      2. Open user menu and click "Log out".
      3. Go offline.
      4. 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:

      https://github.com/moodlehq/moodleapp/pull/4080

            dpalou Dani Palou
            dpalou Dani Palou
            Pau Ferrer Pau Ferrer
            Isabel Renedo Rouco Isabel Renedo Rouco
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 36 minutes
                36m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.