Page MenuHomeMiraheze

Numbered list items produce empty list item since MW 1.36
Closed, InvalidPublic

Description

Since the 1.36 upgrade, the wikitext

# <li value=5>Foo</li>

produces

<ol>
<li class="mw-empty-elt"></li>
<li value="5">Foo</li>
</ol>

Example: https://meta.miraheze.org/wiki/User:MusikAnimal/sandbox

This apparently is intentional, and .mw-empty-elt is supposed to be hidden in Core CSS. Git blame states https://gerrit.wikimedia.org/r/c/mediawiki/core/+/682773 as the responsible patch which has not been backported to MW 1.36. The size of this patch and the host of dependent might make it risky to backport.

A workaround is to simply add the relevant CSS to Common.css:

.mw-hide-empty-elt .mw-parser-output .mw-empty-elt {
	display: none;
}

However due to T6362 (upstream bug) there's no way to fix this on MobileFrontend :(

Perhaps this CSS could be added to Miraheze's fork of MW?

Event Timeline

Unknown Object (User) added a comment.Jun 15 2021, 17:00

I can not reproduce this on your meta sandbox it looks correct on multiple skins including MinervaNeue.

Unknown Object (User) moved this task from Backlog to Bugs on the MediaWiki board.Jun 15 2021, 17:01
Unknown Object (User) moved this task from Backlog to Short Term on the Technology-Team (MediaWiki) board.

I can not reproduce this on your meta sandbox it looks correct on multiple skins including MinervaNeue.

Interesting; so it's actually only Vector that's affected. In that skin I see:

1.
5. Foo

When I should see just:

5. Foo

So in that case, the issue resolved for me because of the local fix, but you may wish to manually patch Vector or the Core CSS for the benefit of everyone else.

Unknown Object (User) added a comment.Jun 15 2021, 17:35

According to vector source this will happen on legacy vector but not modern vector. Is this correct?

According to vector source this will happen on legacy vector but not modern vector. Is this correct?

It appears that way.

Looks like they fixed on master and REL1_37, I've created a cherry pick for REL1_36 here. Dunno if we can check if it works, but it's all I got.

Unknown Object (User) edited projects, added Extensions; removed MediaWiki.Jun 15 2021, 18:03
Unknown Object (User) moved this task from Backlog to Deployed Extension Bugs on the Extensions board.Jun 15 2021, 18:04
Unknown Object (User) moved this task from Unsorted to Short Term on the Universal Omega board.
Unknown Object (User) added a project: Upstream.
In T7468#149686, @Void wrote:

Looks like they fixed on master and REL1_37, I've created a cherry pick for REL1_36 here. Dunno if we can check if it works, but it's all I got.

Just to update, the patch has been approved but we're blocked on unrelated test issues. It's currently being tracked upstream and marked as Unbreak Now! but it's All Hands so we're expecting up to a few days for a response.

Unknown Object (User) closed this task as Invalid.Jun 21 2021, 03:11

Closing per Upstream task to resolve the CI issues.

No need to keep this open here for upstream-related stuff after it's being tracked upstream.

Upstream patch(es) have been merged, fix should be live here soon.