-
Bug
-
Resolution: Fixed
-
Minor
-
3.7.2
-
-
MOODLE_37_STABLE
-
MOODLE_38_STABLE
-
Moodle App 3.8.0
If you are offline and you try to access a page from a plugin where that page has never been loaded before (so there is no cached version), the app appears to 'freeze'. What happens:
- You see a warning telling you that you are offline: 'There was a problem connecting to the site. Please check your connection and try again.'
- You OK the warning.
- There is a 'Loading' spinner still visible.
- Press the Back button.
- Nothing happens.
You can also try to go back by pressing the current tab button at the bottom of the app (or left on tablet view). This shows the 'Are you sure you want to go back to' prompt, but when you press OK, nothing happens.
The cause of this bug is that the app sends an 'ionViewCanLeave' call to the CoreCompileHtmlComponent, which waits for the HTML component to be loaded before processing it. But the HTML component never loads.
This can be reproduced on phone and on Moodle Desktop.
I have coded a solution which I will share here along with an example plugin.