If the article fails to load, we give the user the option to retry:
If the second try succeeds, we show the read mode and the edit beneath it:
A retry loop can be tested with the following patch:
diff --git a/modules/ve-mw/init/targets/ve.init.mw.ArticleTarget.js b/modules/ve-mw/init/targets/ve.init.mw.ArticleTarget.js index c129712fb..e640a7d61 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.ArticleTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.ArticleTarget.js @@ -354,7 +354,8 @@ ve.init.mw.ArticleTarget.prototype.loadSuccess = function ( response ) { var mode, section, data = response ? ( response.visualeditor || response.visualeditoredit ) : null; - if ( !data || typeof data.content !== 'string' ) { + if ( !this.retried ) { + this.retried = true; this.loadFail( 've-api', 'No HTML content in response from server' ); } else if ( response.veMode && response.veMode !== this.getDefaultMode() ) { this.loadFail( 've-mode', 'Tried to load "' + response.veMode + '" data ' +