Last modified: 2007-12-18 16:45:43 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 12340 - Edit links are appearing below section header line instead of above
Edit links are appearing below section header line instead of above
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2007-12-18 15:04 UTC by Carl Austin Bennett
Modified: 2007-12-18 16:45 UTC (History)
3 users (show)

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


Description Carl Austin Bennett 2007-12-18 15:04:21 UTC
Edit links are appearing below the section header line instead of above it. This is interfering with formatting of some pages, as it can push text into a position where it is overlapped by images.

This appears to be the result of a one-line change in Linker.php; 1.12alpha (r28587) line 1228 has in public function makeHeadline( $level, $attribs, $anchor, $text, $link ):

return "<a name=\"$anchor\"></a><h$level$attribs<span class=\"mw-headline\">$text</span>$link </h$level>";

Changing the order of these elements puts things back the way they were:

return "<a name=\"$anchor\"></a>$link <h$level$attribs<span class=\"mw-headline\">$text</span></h$level>";

So far, this has been tested only on and (regular-script Chinese, zh-tw) but I'd expect the same results once the change is applied to others.

Was this change made by accident or by design? -- en:user:carlb

The original HTML problem (as reported to me) was this:

The original code is:

<h2><span class="editsection">
[<a href="/index.php?title=aaa&action=edit&section=15" title="編輯段落: aaa">編輯</a>]
</span><span class="mw-headline">aaa</span </h2>

Now becomes:

<h2><span class="mw-headline">aaa</span>
<span class="editsection">[<a href="/index.php?title=aaa&action=edit&section=15" title="編輯段落: aaa">編輯</a>]
</span> </h2>

This cause some layout problems. --Leeyc0 10:00, 18 December 2007 (UTC)
Comment 1 Carl Austin Bennett 2007-12-18 15:37:15 UTC
A minor correction, that line should become:

return "<a name=\"$anchor\"></a><h$level$attribs$link <span class=\"mw-headline\">$text</span></h$level>";
Comment 2 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-12-18 16:18:54 UTC
What browser are you using, what OS and what resolution?  The provided link doesn't show the problem for me.  (It shows them too much *above* the line, sometimes.)
Comment 3 leeyc0 2007-12-18 16:23:11 UTC
I am the original reporter of this bug. It is because Carl has already modified the source code in his installation. For your information, I am using Firefox in Windows XP, resolution 1440x900.
Comment 4 Carl Austin Bennett 2007-12-18 16:29:41 UTC
The original (buggy) version is on

The patched (valid) version is on

However, it may be necessary to use ?action=purge with these as otherwise old versions are being cached, which makes it difficult to see what's happening.

I'm viewing with Firefox 2.0 here, 1280x1024. The co-lo webserver is CentOS5 on a pair of Opteron 2220's.
Comment 5 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-12-18 16:45:43 UTC
I've reverted in r28630, so this should be fixed.

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