Page MenuHomePhabricator

Feature/extension suggestion for links to sections that are missing/renamed
Open, Needs TriagePublic

Description

Situation: something links directly to a section of a page (e.g. [[Example#References]]), but at some point that section is removed or renamed, so the link just goes to the top of the page.

It would be nice if, when landing on a page, mediawiki (or extension) detects the "fragment" identifier and, if the section is not found on the current version of the page, attempt to search the page's history for the latest version that the section existed with the provided name.

If the history search succeeds, provide the reader with the information about the edit that removed/renamed that section.

Event Timeline

Hi @Esjs, thanks for taking the time to report this and welcome to Phabricator.

If the history search succeeds, provide the reader with the information about the edit that removed/renamed that section.

As an average reader of an article, how would it help me if some banner told me "The anchor link (that part after the # in the link that you just clicked to get here) led to a section on this page which got removed in the meantime"? How is that relevant for me?
The result is the same anyway: I end up at the top of the page?

Hi @Aklapper. Thanks for asking.
If the banner provides the reader with, say, a link to the diff of the edit that removed/renamed the section, I can see a few advantages:

  1. The reader can see where the intended section/information used to be. If it shows that the section was simply renamed, they can go to the new section name. Likewise if the edit shows that the section was removed and the information was possibly moved to another section.
  2. A willing and able editor can go fix the source link to point to the new correct location, if possible.
  3. Some readers may not realize that the link was supposed to go directly to a section and may be confused why they were brought to a whole page discussing something much broader than what they were interesting in or looking for.

Of course, it would just be a convenience for somebody who knows how to use mediawiki enough to search the page history themselves. Since the change (assuming it exists) could be recent or very very old, searching the page history manually can be tedious. Why not have software do it?

Hopefully that clarifies my intent.

Also see T10928#137749 and T18561: Make links to nonexisting sections being easy distinguishable (which is another approach).
Removing #mediawiki-history-and-diffs as this is not related to the History or Diff pages.