Page MenuHomePhabricator

Merge UnusedRedirects extension functionality into MediaWiki core
Closed, DeclinedPublic

Description

There currently isn't any functionality in MediaWiki core for checking what unused redirects exist (Special:UnusedRedirects). This should be merged into the core.

[Consensus is against this]

Event Timeline

What exactly are "unused redirects"? Redirects that have no inbound links?

Could you explain why this query report would be useful in core? As an example, English Wikipedia will have many thousands of unused redirects (however you define the term), kept to avoid link rot, and nothing needs to be done with them. The same is no doubt true of many wikis.

This feature could be useful for maintenance, but it depends on what a unused redirect is as @TTO said.

I just wanted to create this task, but great thing is that task is already created.

This sounds as a very great idea, so I would like to know which is status of this task, as I would like to try to work on this task.

There are already too many editors out there who believe redirects are "bad"; adding this functionality to core would only validate that view by providing them with a maintenance report which existence implicitly claims that certain redirects are categorically bad (similar maintenance reports indicate problems that need to be fixed, providing an obvious parallel argument).

DannyS712 subscribed.

Per above, there are some objections - I suggest starting a thread at https://www.mediawiki.org/wiki/Suggestions_for_extensions_to_be_integrated for wider visibility

I still believe we should move forward with this. We already have Special:BrokenRedirects and Special:DoubleRedirects, so adding Special:UnusedRedirects would round out the redirect‑management suite and eliminate the need to maintain a standalone ~188‑line extension.

The current extension isn’t compatible with recent MediaWiki releases because of the pagelinks migration.

I’ve drafted a patch (which I’ll upload to Gerrit when I post this comment) that adds the necessary messages to en.json and qqq.json. Since the translations already exist at https://translatewiki.net/wiki/MediaWiki:Unusedredirects/en and the rest, all other translations would be pulled in automatically from translatewiki.net.

Per above, there are some objections - I suggest starting a thread at https://www.mediawiki.org/wiki/Suggestions_for_extensions_to_be_integrated for wider visibility

Started at https://www.mediawiki.org/wiki/Suggestions_for_extensions_to_be_integrated#UnusedRedirects

Change #1137546 had a related patch set uploaded (by Zoranzoki21; author: Zoranzoki21):

[mediawiki/core@master] Merge UnusedRedirects extension functionality into MediaWiki core

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

Test wiki on Patch demo by Kizule using patch(es) linked to this task was deleted:

https://patchdemo.wmcloud.org/wikis/1d27f69d2f/w/

There are already too many editors out there who believe redirects are "bad"; adding this functionality to core would only validate that view by providing them with a maintenance report which existence implicitly claims that certain redirects are categorically bad (similar maintenance reports indicate problems that need to be fixed, providing an obvious parallel argument).

For what it's worth, I disagree that this would "validate" the editors' incorrect assumptions, or that there even is a way to address these kind of social issues with technical solutions.

All this being said, the main issue with "unused" special pages like UnusedImages is that we obviously have no way of knowing which are used by third parties. UnusedCategories and UnusedTemplates are somewhat easier from a technical point of view; UnusedImages and UnusedRedirects aren't exactly equally clear-cut cases.

The current extension isn’t compatible with recent MediaWiki releases because of the pagelinks migration.

I've submitted a very lightly tested patch to address that; please feel free to review & test it!

I still haven't seen a clear response to the two points I made in my 2017 comment:

What exactly are "unused redirects"? Redirects that have no inbound links?

Could you explain why this query report would be useful in core? As an example, English Wikipedia will have many thousands of unused redirects (however you define the term), kept to avoid link rot, and nothing needs to be done with them. The same is no doubt true of many wikis.

In particular I question the assumption that "unused redirects" (whatever this might mean) are worth keeping track of.

Tech News - @Kizule and @Pppery, What wording would you suggest as the content, and When should it be included in Tech News? Thanks!

What wording would you suggest as the content

Something announcing the addition of the new special page. I'll come up with some wording if and when it's actually ready.

When should it be included in Tech News?

Only if and when the patch above is merged. So not any time soon

What wording would you suggest as the content

Something announcing the addition of the new special page. I'll come up with some wording if and when it's actually ready.

When should it be included in Tech News?

Only if and when the patch above is merged. So not any time soon

Okay, thanks!

Per: https://www.mediawiki.org/wiki/Help:Redirects#Deleting_a_redirect

There's generally no need to delete redirects. They do not occupy a significant amount of database space. If a page name is vaguely meaningful, there's no harm, and some benefit, in having it as a redirect to the more relevant or current page.

And

https://meta.wikimedia.org/wiki/Don%27t_delete_redirects

I still haven't seen a clear response to the two points I made in my 2017 comment:

What exactly are "unused redirects"? Redirects that have no inbound links?

Could you explain why this query report would be useful in core? As an example, English Wikipedia will have many thousands of unused redirects (however you define the term), kept to avoid link rot, and nothing needs to be done with them. The same is no doubt true of many wikis.

In particular I question the assumption that "unused redirects" (whatever this might mean) are worth keeping track of.

I believe "UnusedRedirects" refers to Redirects that aren't clicked on in the wiki or clicked on from an old link off-site, basically it has no web traffic, I don't believe it would be classed as a Broken or DoubleRedirect because it would need to exist to be Unused, I can understand why people might want to clean up UnusedRedirects, I administrate a large wiki that has more redirects than pages, and it gets annoying having to sift through all of them without making the redirects stand out more with CSS etc, you can keep the redirects, I guess it's just to keep track of them all or to delete the most absurd of the bunch? I see use in it, just not all the time use or particularly more important than UnusedRedirects or BrokenRedirects.

Redirects that aren't clicked on in the wiki or clicked on from an old link off-site, basically it has no web traffic

MediaWiki doesn't track page views, at least not since 2014. So I don't think this can be right.

Thinking about this request, which I think should be declined...

I have made a request at T393668: Extension to create magic word for bad redirects which would mean that redirects you don't really want to link to, but at the same time also don't want to delete, can be marked as "bad redirects." This would be helpful for bot and semi-bot edits. I think that's a better approach to this issue.

Bugreporter2 updated the task description. (Show Details)

Change #1137546 abandoned by Zoranzoki21:

[mediawiki/core@master] Merge UnusedRedirects extension functionality into MediaWiki core

Reason:

Per comments in the task.

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