Page MenuHomePhabricator

Update WikiEditor for changes in AbuseFilter and SpamBlacklist API error responses
Open, Needs TriagePublic


API error responses generated by AbuseFilter and SpamBlacklist have changed, as announced here: (relevant task: T229539).

It appears you have special handling for the old responses. It only affects event logging.

  300: 				} elseif ( isset( $errors[0][0] ) && $errors[0][0] === 'abusefilter-disallowed' ) {

Event Timeline

So it turns out that this line doesn't need updating, because it is looking at the error message key rather than the error code, and still works as expected.

However, a few lines below is this:

				} elseif ( isset( $errors[0][0] ) && $errors[0][0] === 'spamprotectiontext' ) {

…and this actually does need updating – not because of the API changes, but because of

Change 536375 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/WikiEditor@master] Update SpamBlacklist error logging

Change 536375 merged by jenkins-bot:
[mediawiki/extensions/WikiEditor@master] Update SpamBlacklist error logging