Last modified: 2014-04-30 10:50:48 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T2111, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 111 - Return to page after edit of section when section name occurs multiple times may point to wrong section
Return to page after edit of section when section name occurs multiple times ...
Status: PATCH_TO_REVIEW
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
1.23.0
All All
: Lowest minor with 10 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 118 2022 2404 3196 5395 15847 21275 34225 60463 64147 (view as bug list)
Depends on:
Blocks: 5019 section-editing
  Show dependency treegraph
 
Reported: 2004-08-16 06:02 UTC by Timwi
Modified: 2014-04-30 10:50 UTC (History)
28 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Timwi 2004-08-16 06:02:51 UTC
BUG MIGRATED FROM SOURCEFORGE
http://sourceforge.net/tracker/index.php?func=detail&aid=963066&group_id=34373&atid=411192
Originally submitted by Nobody/Anonymous - nobody  2004-05-30 11:51


If there are two sections with the same name, e.g: 
"X", "Examples" (of X)
"Y", "Examples" (of Y)
and you edit "Examples" (of Y), after saving the page
you will be returned to "Examples" (of X)

------------------------- Additional comments ------------------------
Date: 2004-08-09 07:13
Sender: SF user vibber

Lowering priority. It's kind of annoying, but rare
and non-destructive.
Comment 1 Rowan Collins [IMSoP] 2004-08-16 23:34:07 UTC
*** Bug 118 has been marked as a duplicate of this bug. ***
Comment 2 Brion Vibber 2005-04-30 10:34:37 UTC
*** Bug 2022 has been marked as a duplicate of this bug. ***
Comment 3 Brion Vibber 2005-06-13 21:08:33 UTC
*** Bug 2404 has been marked as a duplicate of this bug. ***
Comment 4 lɛʁi לערי ריינהארט 2005-07-13 09:40:09 UTC
renamed to "Return to page after edit of section *(where section name occurs
multiple times)*"

last note in bug 2831 coment 0 releates to this

Regards Reinhardt [[user:gangleri]]
Comment 5 Brion Vibber 2005-08-19 09:24:04 UTC
*** Bug 3196 has been marked as a duplicate of this bug. ***
Comment 6 Rob Church 2006-03-30 00:40:50 UTC
*** Bug 5395 has been marked as a duplicate of this bug. ***
Comment 7 Edward Z. Yang 2006-06-19 17:39:38 UTC
A possible fix would be to keep an lookup array of used id/names and keep on
adding to it as you parse the wikitext. If there's a collision, append a number,
and try again (if another collision, increment the number). Not sure how this
would affect the rest though, and there would be no way of figuring out the
anchor name from an isolated section.
Comment 8 stux 2007-01-14 21:51:39 UTC
I beleive you may have to simply re-parse the entire file until we get to the
section in question and just count the number of ocurrances where we see the
same title (this can be done before the edit screen shows up, special care must
be taken during edit conflicts). The section headings following the one we edit
really do not affect the nomenclature of the emerging link.  HOWEVER, I do see a
problem with changing heading names breaking external links to specific
sections. See this test page for an example:
http://test.wikipedia.org/w/index.php?title=User:Stux/sectionTest1&action=history

But that belongs at a different bug and I think that duplicate headings should
be handled differently (i.e. #Section_Subsection_SubSubsection). 
Comment 9 Will Hirsch 2008-03-16 22:13:56 UTC
While in the main namespace, #Section_Subsection_SubSubsection may both be logical and solve this problem, in talk pages it is not uncommon for there to be more than one heading with the same name on the same level. This would still not be addressed, and I would assume that the numbering as currently used in anchors would be best.
Comment 10 Brion Vibber 2008-12-30 01:54:18 UTC
I believe the section IDs can be obtained from the parser output structure these days, and we do a parse on save. Should be possible to grab the proper formulation of the section name for the redirect.
Comment 11 Church of emacs 2009-05-06 20:24:57 UTC
This bug is related to bug 18700 ("Link to section does not work in edit summaries in case of multiple sections with the same name").
Comment 12 Chad H. 2009-05-06 20:48:05 UTC
*** Bug 18700 has been marked as a duplicate of this bug. ***
Comment 13 Brion Vibber 2009-07-20 04:12:59 UTC
*** Bug 15847 has been marked as a duplicate of this bug. ***
Comment 14 Alexandre Emsenhuber [IAlex] 2009-10-25 10:10:10 UTC
*** Bug 21275 has been marked as a duplicate of this bug. ***
Comment 15 Alexandre Emsenhuber [IAlex] 2012-03-20 09:34:53 UTC
*** Bug 34225 has been marked as a duplicate of this bug. ***
Comment 16 Alexandre Emsenhuber [IAlex] 2013-03-24 08:32:01 UTC
Partial fix in Gerrit change #55508.
Comment 17 Fomafix 2014-01-27 11:41:59 UTC
*** Bug 60463 has been marked as a duplicate of this bug. ***
Comment 18 MZMcBride 2014-01-28 04:39:14 UTC
Keywords for finding this bug again: duplicate section header, duplicate section heading, same section headers, same section headings, post-save redirect
Comment 19 Quim Gil 2014-04-11 16:48:34 UTC
Still reproducible today, both with "Edit source" and "Edit links".

Filed almost 10 years ago, with 9 duplicates (the last one less than 4 months old), 20 users CCed, 10 votes, and a -1 changeset that went through 12 revisions last Summer, I think this is the oldest relevant bug that still bothers people.

Any ideas to solve it? Dan, this might be a good candidate in your list.

PS: adding "design" keyword because this is a UX problem.
Comment 20 Jared Zimmerman (WMF) 2014-04-11 17:26:33 UTC
Quim, while I agree it is a bad user experience, the fix seems to be a purely engeineering one. If this is 10 years old hopefully Parsoid offers a solution now.
Comment 21 Dan Garry 2014-04-11 18:50:43 UTC
(In reply to Quim Gil from comment #19) 
> Any ideas to solve it? Dan, this might be a good candidate in your list.

My list (context: https://www.mediawiki.org/wiki/Platform_product_microtasks) is for problems where I can clearly define the engineering solution. In this case, I can only think of one easy solution, and it's a bit of a ridiculous one, so it's better that I leave it off the list.

(In reply to Jared Zimmerman (WMF) from comment #20)
> Quim, while I agree it is a bad user experience, the fix seems to be a
> purely engeineering one. If this is 10 years old hopefully Parsoid offers a
> solution now.

Sure. We can leave the keyword off.
Comment 22 Quim Gil 2014-04-15 16:50:34 UTC
Alright, then this means that nobody is planning to work on this right now. Setting priority accordingly.

The fact is that a MediaWiki page with several sections with the same label will have a different anchor for each. See "#Test", "#Test_2", "#Test_3"... at https://www.mediawiki.org/wiki/User:Qgil/Sandbox#Test_2

The TOC can deal well with these anchors. How difficult would be to make that, after editing a section, the browser lands in the specific anchor and not in the first one? Sorry, I don't know enough to understand where MatmaRex's patch got stuck.
Comment 23 Bartosz Dziewoński 2014-04-15 19:13:40 UTC
(In reply to Quim Gil from comment #22)
> MatmaRex's patch

IAlex's patch, not mine :)
Comment 24 Andre Klapper 2014-04-21 05:55:51 UTC
*** Bug 64147 has been marked as a duplicate of this bug. ***
Comment 25 Cristian B. 2014-04-30 10:50:48 UTC
(In reply to Quim Gil from comment #22)
> 
> The fact is that a MediaWiki page with several sections with the same label
> will have a different anchor for each. See "#Test", "#Test_2", "#Test_3"...
> at https://www.mediawiki.org/wiki/User:Qgil/Sandbox#Test_2
> 
> The TOC can deal well with these anchors.

There's still one gotcha though: if you have sections "Test", "Test", and "Test 2". The last two get the same hash-name!

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links