Page MenuHomePhabricator

Create special page for finding redirects to fragments/sections that don't exist
Open, LowPublicFeature

Description

With redirect.rd_fragment now implemented, it should be possible to list redirects where the target contains a broken section anchor. For example, if the redirect page "Baz" contains "#REDIRECT [[Foo#Bar]]" and the "Bar" section no longer exists on the page "Foo", "Baz" would be listed somewhere in the user interface.

This could be implemented in a separate special page or in Special:BrokenRedirects.


Severity: enhancement

Details

Reference
bz28813

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:33 PM
bzimport set Reference to bz28813.
bzimport added a subscriber: Unknown Object (MLST).

There's still no guarantee that the target anchor of the redirect is pointing to a section as opposed to a hand made <div id="blah"> thing. However, ignoring that we also don't store what sections actually exist on a page (as far as I'm aware) in the db. So there's still a fair bit more to do before that can happen.

Krinkle renamed this task from User interface to list broken redirect section anchors to Create special page for finding redirects to fragments/sections that don't exist.Jul 31 2017, 9:31 PM
Krinkle updated the task description. (Show Details)
Krinkle moved this task from General to General on the MediaWiki-Redirects board.
Krinkle removed a subscriber: wikibugs-l-list.

Another idea is to use the Linter extension and its framework to add a tracking category to redirect pages that have invalid/broken section anchors. This would require getting the Linter extension to work with a non-Parsoid "external service" and would require solving the challenges @Bawolff mentions about manually added IDs.

After the redirect target page is touched and we have the rendered HTML, we could look for all IDs, whether manually added or via a section link, then look up section redirects, and then record the missing ones as lint errors (or somewhere). And then we'd have to do the same whenever the redirect page itself is edited and contains a fragment.

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:00 AM