Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/199868
Change subject: Skip revId check for new pages ...................................................................... Skip revId check for new pages Makes it possible to edit new pages again. Follows up Ifbf44b7772 Change-Id: If170a367dc2f531d11f09569c7ab45ebd414dff6 --- M modules/ve-mw/init/ve.init.mw.Target.js 1 file changed, 19 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/68/199868/1 diff --git a/modules/ve-mw/init/ve.init.mw.Target.js b/modules/ve-mw/init/ve.init.mw.Target.js index e902e2c..9521c5c 100644 --- a/modules/ve-mw/init/ve.init.mw.Target.js +++ b/modules/ve-mw/init/ve.init.mw.Target.js @@ -335,24 +335,26 @@ this.startTimeStamp = data.starttimestamp; this.revid = data.oldid; - aboutDoc = this.doc.children[0].getAttribute( 'about' ); - docRevId = aboutDoc.match( /revision\/([0-9]*)$/ )[1]; - if ( Number.parseInt( docRevId ) !== this.revid ) { - if ( this.retriedRevIdConflict ) { - // Retried already, just error the second time. - ve.init.mw.Target.onLoadError.call( - this, - 've-api', - 'Revision IDs (doc=' + docRevId + ',api=' + this.revid + ') ' + - 'returned by server do not match' - ); - } else { - this.retriedRevIdConflict = true; - // Have to retry both until we can access the document server directly... - this.loading = false; - this.load(); + if ( this.originalHtml ) { + aboutDoc = this.doc.children[0].getAttribute( 'about' ); + docRevId = aboutDoc.match( /revision\/([0-9]*)$/ )[1]; + if ( Number.parseInt( docRevId ) !== this.revid ) { + if ( this.retriedRevIdConflict ) { + // Retried already, just error the second time. + ve.init.mw.Target.onLoadError.call( + this, + 've-api', + 'Revision IDs (doc=' + docRevId + ',api=' + this.revid + ') ' + + 'returned by server do not match' + ); + } else { + this.retriedRevIdConflict = true; + // Have to retry both until we can access the document server directly... + this.loading = false; + this.load(); + } + return; } - return; } // Populate link cache -- To view, visit https://gerrit.wikimedia.org/r/199868 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If170a367dc2f531d11f09569c7ab45ebd414dff6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders <esand...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits