Skip to content

Conversation

@RobinMcCorkell
Copy link
Member

E.g. if there's an error loading some part of the admin settings page (just happened to me), the page will reload continuously with no clear indication that there's something wrong. This PR puts a 5 second delay on the reload, and prints a notification to make things clear. I would have liked to also print the URL that was failing, but the xhr object doesn't store the right information and getting the URL through to the error handler seems awkward.

cc @PVince81 @jancborchardt

setTimeout(function() {
if (!self._userIsNavigatingAway && !self._reloadCalled) {
OC.reload();
OC.Notification.show(t('core', 'Problem loading page, reloading in 5 seconds'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this can happen for timed out sessions too. Should the text say "Problem doing request" instead ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's acceptable to see 'problem loading page' if the session times out, since it's some part of the page that has failed, not the specific request to load the HTML page. Also 'request' is far more technical than 'page'

@jancborchardt
Copy link
Member

Sounds good, better than the page going nuts.

@PVince81 PVince81 added this to the 9.1-current milestone Apr 20, 2016
@PVince81
Copy link
Contributor

Makes sense 👍

@LukasReschke
Copy link
Member

jsunit seems unhappy

@RobinMcCorkell
Copy link
Member Author

@PVince81 Mind re-reviewing this along with the modified tests?

@PVince81
Copy link
Contributor

👍

@PVince81
Copy link
Contributor

PVince81 commented Jun 8, 2016

Let's backport this to 9.0 to avoid false positives to cause a sudden reload: #25035

@lock
Copy link

lock bot commented Aug 5, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants