Page MenuHomePhabricator

Empty li item in external links list
Closed, ResolvedPublic

Description

The Batman article displays with an empty li item:

In desktop this li is present but has a class:

<li class="mw-empty-elt">
</li>

Is this happening in MCS or upstream in Parsoid?

Expected:
It should either have the mw-empty-elt element class or be removed

Event Timeline

Jdlrobson created this task.Aug 9 2017, 2:58 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Jdlrobson renamed this task from Empty to Empty li item in external links list.Aug 17 2017, 2:08 PM
bearND added a subscriber: bearND.

This reminds me of T129375 but is different since this is about MCS/Parsoid output, which don't even have the mw-empty-elt class on the empty `<li>.

Since the equivalent Parsoid output[1] doesn't have the mw-empty-elt class MCS cannot have it neither.

<li id="mwCME"> </li>

[1] https://en.wikipedia.org/api/rest_v1/page/html/Batman

This reminds me of T129375 but is different since this is about MCS/Parsoid output, which don't even have the mw-empty-elt class on the empty `<li>.

Since the equivalent Parsoid output[1] doesn't have the mw-empty-elt class MCS cannot have it neither.

<li id="mwCME"> </li>

[1] https://en.wikipedia.org/api/rest_v1/page/html/Batman

Okay, Parsoid be adding that class to empty elements. That is easily fixed.

ssastry triaged this task as Normal priority.Aug 24 2017, 2:05 AM
ssastry claimed this task.

Change 373420 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] T172896: Add mw-empty-elt class to empty li items that can't be deleted

https://gerrit.wikimedia.org/r/373420

Change 373420 merged by jenkins-bot:
[mediawiki/services/parsoid@master] T172896: Add mw-empty-elt class to empty li items that can't be deleted

https://gerrit.wikimedia.org/r/373420

Arlolra closed this task as Resolved.Sep 19 2017, 6:28 PM

Looks like this has been deployed today. I still don't see the class attribute for the <li> in the example page[1], even after a purge.

[1] https://en.wikipedia.org/api/rest_v1/page/html/Batman

Are you sure? I see <li class="mw-empty-elt" id="mwCME"> </li>

Ok, I see it now in the HTML source. To get this change visible for users there needs to be a CSS rule added somewhere.