mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-27 09:43:30 +00:00
CommentController: Remove remains of client-side edit conflict handling
In commit 8829a1a412
we kept this code
when adding the reply API, but on second thought it doesn't actually
make sense.
The reply API should never fail with an edit conflict normally, since
it makes the edit on the latest version of the page. If it does fail,
I think it's better to just show the error message. Current behavior
is to retry, and if that doesn't actually solve the problem, this ends
up in an infinite loop.
Bug: T252558
Change-Id: I5e0dcb2c42e5de4f18e99b8a761ca048a430b31e
This commit is contained in:
parent
9e7287d233
commit
2d038af705
|
@ -299,10 +299,6 @@ CommentController.prototype.save = function ( comment, pageName ) {
|
|||
api: new mw.Api( { ajax: { timeout: 0 }, parameters: { formatversion: 2 } } )
|
||||
}
|
||||
).catch( function ( code, data ) {
|
||||
// Try again if there's an edit conflict. The latest revision will be fetched on the server.
|
||||
if ( code === 'editconflict' ) {
|
||||
return commentController.save( comment, pageName );
|
||||
}
|
||||
// Better user-facing error message
|
||||
if ( code === 'discussiontools-commentid-notfound' ) {
|
||||
return $.Deferred().reject( 'discussiontools-commentid-notfound', { errors: [ {
|
||||
|
|
Loading…
Reference in a new issue