Page MenuHomePhabricator

even 1.5 gets confused on section editing when <h*> sections are involved
Closed, ResolvedPublic

Description

Author: avarab

Description:
1.4 gets confused on section editing when <h*> sections are involved, if one
creates a page like this:

""""
<h2> Section 1 </h2>
Section 1Section 1Section 1Section 1Section 1
<h2> Section 2 </h2>
Section 2 Section 2 Section 2 Section 2 Section 2 Section 2

Section 3

Section 3Section 3Section 3Section 3Section 3Section 3Section 3Section 3

Section 4

Section 4Section 4Section 4Section 4Section 4Section 4Section 4Section 4

Section 5

Section 5Section 5Section 5Section 5Section 5Section 5Section 5Section 5

Section 6

Section 6 Section 6 Section 6 Section 6 Section 6 Section 6
""""

and saves it edit links will appear for sections 3-6 like they should, however
following the edit link for section 3 will bring up an editbox for section 1,
editing section 4 will bring up the box for section 2, 5 for 3 and 6 for 4.


Version: 1.5.x
Severity: normal

Details

Reference
bz2128

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:26 PM
bzimport set Reference to bz2128.
bzimport added a subscriber: Unknown Object (MLST).

avarab wrote:

See also bug 2129, a section generation bug in 1.5.

zigger wrote:

*** This bug has been marked as a duplicate of 966 ***

avarab wrote:

*** Bug 966 has been marked as a duplicate of this bug. ***

avarab wrote:

This was a dupe, but keeping it in favor of bug 996 since it (IMO) does a better
job of explaining the issue.

gangleri wrote:

Halló!

I do not know if this is the same bug which I noticed begining of February 2005.

If you go to
[[eo:Vikipedio:Trukoj/Plurnivela uzado de ŝablonoj#UNDERSCORES]]
end edit the section you will get
http://eo.wikipedia.org/w/index.php?title=Vikipedio:Trukoj/Plurnivela_uzado_de_%C5%9Dablonoj&action=edit&section=25
This is the section above
[[eo:Vikipedio:Trukoj/Plurnivela uzado de ŝablonoj#Helpo rilate - Help regarding
Mediawiki Extensions]]

As far as I remember only id="foo" where used as anchors.

Best regards Reinhardt

avarab wrote:

(In reply to comment #5)

Halló!

I do not know if this is the same bug which I noticed begining of February 2005.

Could you reduce it to a simple testcase please.

zigger wrote:

(In reply to comment #6)
Opened as bug 2375.

This is already fixed in 1.5 (section edit links are now generated properly for
these headers). If someone wants to backport the fix to 1.4, feel free to post a
patch, but resolving as FIXED on main branch.

rowan.collins wrote:

Reopening under 1.5, because it's still not handled quite right:
The biggest problem is if the <h*> occurs inside a template, in which case the
section edit link points at the containing article instead of the template, and
all the counting goes up the spout again (since the template has counted one too
few sections, and the containing page one too many).

But in testing, I noticed that the sections don't nest properly either -
section-editting an "<h3>" section includes a "==" section below it, implying
that "<h3>" comes above, rather than below, "==".

rowan.collins wrote:

Note: see also bug 2607 (I'm not sure whether to mark these as dupes of one
another, as there seem to be several different issues here)

stux wrote:

*** This bug has been marked as a duplicate of 2607 ***