Page MenuHomePhabricator

Remove SpamBlacklist error handling from ApiVisualEditorEdit.php
Closed, ResolvedPublic

Description

Remove SpamBlacklist error handling from ApiVisualEditorEdit.php.

				if ( isset( $saveresult['edit']['spamblacklist'] ) ) {
					$matches = explode( '|', $saveresult['edit']['spamblacklist'] );
					$matcheslist = $this->getLanguage()->listToText( $matches );
					$result['edit']['sberrorparsed'] = $this->msg( 'spamprotectiontext' )->parse() . ' ' .
						$this->msg( 'spamprotectionmatch', $matcheslist )->parse();
				}

We probably can ask the API to return parsed errors and remove this bit? (And then change SpamBlacklistSaveErrorHandler to not use 'sberrorparsed'.)

Details

Related Gerrit Patches:
mediawiki/extensions/VisualEditor : masterApiVisualEditorEdit: Remove special handling for SpamBlacklist
mediawiki/extensions/SpamBlacklist : masterAdd human-readable error message to edit API response

Event Timeline

matmarex created this task.Dec 7 2018, 6:53 PM
Restricted Application added a project: VisualEditor. · View Herald TranscriptDec 7 2018, 6:53 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
JTannerWMF moved this task from To Triage to Bug Fixes on the VisualEditor board.Dec 12 2018, 2:20 PM
JTannerWMF moved this task from Bug Fixes to FY 19-20 on the VisualEditor board.Dec 12 2018, 2:56 PM

Change 526816 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/SpamBlacklist@master] Improve error message integration

https://gerrit.wikimedia.org/r/526816

Change 526817 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] ApiVisualEditorEdit: Remove special handling for SpamBlacklist

https://gerrit.wikimedia.org/r/526817

matmarex claimed this task.Aug 1 2019, 1:07 AM
matmarex edited projects, added VisualEditor (Current work); removed VisualEditor.
matmarex moved this task from Incoming to Code review on the VisualEditor (Current work) board.

Change 526816 abandoned by Bartosz Dziewoński:
Add human-readable error message to edit API response

Reason:
On second thought, I might as well merge this into https://gerrit.wikimedia.org/r/c/mediawiki/extensions/SpamBlacklist/ /526829

https://gerrit.wikimedia.org/r/526816

Change 526817 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] ApiVisualEditorEdit: Remove special handling for SpamBlacklist

https://gerrit.wikimedia.org/r/526817

ppelberg closed this task as Resolved.Oct 22 2019, 12:46 AM