Page MenuHomePhabricator

Link to section does not work in edit summaries in case of multiple sections with the same name
Closed, DuplicatePublic

Description

Author: bdanee88

Description:
If I add or edit a section on a page, where are multiple sections with the same name, the edit summary always links to the first section, not the second, third etc.

Example: I've added a second Ellenőrzőműhely section to this talk page, and the arrow in the beginning links to the bad section (the first):
http://hu.wikipedia.org/w/index.php?title=Szerkeszt%C5%91vita%3AHkoala&diff=5410244&oldid=5409872

Later I had to reply, but the error occours again:
http://hu.wikipedia.org/w/index.php?title=Szerkeszt%C5%91vita:Hkoala&diff=next&oldid=5410244


Version: unspecified
Severity: enhancement

Details

Reference
bz18700

Event Timeline

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

This bug is related to bug 00111. MediaWiki deals badly with multiple identically-named sections, the whole system really needs to be fixed.

  • This bug has been marked as a duplicate of bug 111 ***

bdanee88 wrote:

Why dupe? It's just related, not the same as bug 111... It's about edit summary problems, there is no even single a word (except church.of.emacs.ml@gmail.com's note about this bug) about it.

It's the exact same problem: poor handling of articles with multiple sections of the same name.

bdanee88 wrote:

Same problem, but not exact match: bug 111 is about jumping to bad sections after editing, this is about false edit summaries. Anyway, this bug is not created because I want an immediate solution, just to draw attention to the existence of it, because there were no such bug. I set priority to low, and I think it does not hurts anybody.

ayg wrote:

This is a separate bug, it's separate code paths. Bug 111 is easier to fix, since you should be able to just grab the section number from the parser when you save. This bug is entirely different to fix, and considerably more troublesome. You'd have to store some extra data with the section name to know which section to jump to.

The whole way we store section anchors for edit summaries is really fragile anyway. Try editing a section whose name contains the string "*/". Or for that matter, try adding /* C-style comments */ to your edit summary -- they turn into weird-looking links (uselessly, since you could just do [[Pagename#Section]] for a normal link; we could probably arrange for #Section to work too). There are probably other failure cases too.

It might be better not to store the section anchors in-band at all. rev_section and rev_section_number, maybe? That would require UI changes too to work as desired. Seems like a lot of work for a fairly minor thing.

  • Bug 36512 has been marked as a duplicate of this bug. ***
  • This bug has been marked as a duplicate of bug 2831 ***