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

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

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.

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.

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.

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.