Page MenuHomePhabricator

Add custom summary for deleting broken redirects from Special:BrokenRedirects instead of default by MediaWiki
Closed, ResolvedPublic

Description

Steps to Reproduce:

  1. Go in Special:BrokenRedirects
  2. Click Delete on some result

Actual Results:
It will open Special:Delete special page in new tab and will show content was: (something) in summary.

Expected Results:
When it open Special:Delete special page, it should show Broken redirect or something simular in summary.

Event Timeline

Kizule created this task.Jun 28 2019, 11:32 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 28 2019, 11:32 AM

Actual Results:
It will open Special:Delete page in new tab and will show content was: (something)
Expected Results:
It should show summary Broken redirect or something simular.

Why do you expect the "Delete" button to NOT open Special:Delete page anymore? This makes no sense to me...

Aklapper renamed this task from [FEAT] Add custom summary for deleting broken redirects from Special:BrokenRedirects instead of default by MediaWiki to Add custom summary for deleting broken redirects from Special:BrokenRedirects instead of default by MediaWiki.Jun 28 2019, 12:21 PM

Actual Results:
It will open Special:Delete page in new tab and will show content was: (something)
Expected Results:
It should show summary Broken redirect or something simular.

Why do you expect the "Delete" button to NOT open Special:Delete page anymore? This makes no sense to me...

No, you misunderstand me. It should open Special:Delete page and in summary put Broken redirect no content was: (content)

@Zoranzoki21: Then "It will open Special:Delete page" should also be under "Expected Results" or moved to "Steps to Reproduce" as a "End up on the Special:Delete page" item? :)
I admit I don't understand yet what is asked for in this task, sorry... :-/

Kizule updated the task description. (Show Details)Jun 29 2019, 3:02 PM
DannyS712 added a subscriber: DannyS712.

A prefilled reason can be specified using &wpReason=foo at the end of the link to delete the redirect.

Currently, the delete link is coded in SpecialBrokenRedirects::formatResult:

SpecialBrokenRedirects::formatResult
if ( $permissionManager->userHasRight( $this->getUser(), 'delete' ) ) {
	$links[] = $linkRenderer->makeKnownLink(
		$fromObj,
		$this->msg( 'brokenredirects-delete' )->text(),
		[],
		[ 'action' => 'delete' ]
	);
}

to implement the requested feature, a new interface message, brokenredirects-delete-reason can be added and, if the message exists, it will be prefilled as the default message

Restricted Application added a project: User-DannyS712. · View Herald TranscriptOct 10 2019, 5:42 AM

Change 542312 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Add default deletion reason for deleting broken redirects.

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

Change 542313 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[translatewiki@master] Don't translate brokenredirects-delete-reason.

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

MarcoAurelio added a subscriber: MarcoAurelio.

+CPT. Could you please take a look at the patch? Thanks!

Change 542312 merged by jenkins-bot:
[mediawiki/core@master] Add default deletion reason for deleting broken redirects.

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

DannyS712 closed this task as Resolved.Jul 8 2020, 11:41 AM
DannyS712 removed a project: Patch-For-Review.

Change 542313 abandoned by Raimond Spekking:
[translatewiki@master] Don't translate brokenredirects-delete-reason.

Reason:
I am really sorry but I have forgotten this ~ 9 months old patch and submitted a new one: https://gerrit.wikimedia.org/r/c/translatewiki/ /610277

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