Page MenuHomePhabricator

Edit links are appearing below section header line instead of above
Closed, ResolvedPublic

Description

Author: carlb613

Description:
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 uncyclopedia.tw and uncyclopedia.hk (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)


Version: 1.12.x
Severity: minor
URL: http://encyclopedia.tw/wiki/%E8%AC%9B%E5%80%92%E7%B7%9A?action=purge

Details

Reference
bz12340

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:56 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz12340.
bzimport added a subscriber: Unknown Object (MLST).

carlb613 wrote:

A minor correction, that line should become:

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

ayg wrote:

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.)

lee_yiu_chung wrote:

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 2.0.0.11 in Windows XP, resolution 1440x900.

carlb613 wrote:

The original (buggy) version is on http://encyclopedia.tw/wiki/%E8%AC%9B%E5%80%92%E7%B7%9A

The patched (valid) version is on http://uncyclopedia.tw/wiki/%E8%AC%9B%E5%80%92%E7%B7%9A

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.

ayg wrote:

I've reverted in r28630, so this should be fixed.