Page MenuHomePhabricator

Reference previews don't work everywhere when using parsoid read views
Closed, ResolvedPublic

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@ssastry says "This doesn't look like a generic bug -- I see this working in the article namespace for sure, even in infoboxes .. wonder if it is specific to that page OR to template namespace in general. Will continue poking later."

ssastry renamed this task from Reference previews don't work when using parsoid read views to Reference previews don't work on some pages when using parsoid read views.Feb 24 2024, 3:21 PM
ssastry renamed this task from Reference previews don't work on some pages when using parsoid read views to Reference previews don't work everywhere when using parsoid read views.Apr 8 2024, 8:15 AM
ssastry updated the task description. (Show Details)

This functionality comes from https://www.mediawiki.org/wiki/Extension:Popups and looks like we need to look there for breakage.

I can reproduce this locally. So, makes it easier to debug and fix.

While references are rare on wikivoyages, I confirmed this doesn't work on enwikivoyage either. So, looks like it might be an exception rather than the norm that it works on huwiki main namespace with Parsoid HTML.

Change #1018262 had a related patch set uploaded (by Subramanya Sastry; author: Subramanya Sastry):

[mediawiki/core@master] WIP: Convert page-internal link fragments to pure fragment urls

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

Change #1018262 merged by jenkins-bot:

[mediawiki/core@master] ExtractBody: Convert page-internal link fragments to pure fragment urls

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

Change #1019750 had a related patch set uploaded (by Subramanya Sastry; author: Subramanya Sastry):

[mediawiki/core@master] Set Parsoid page title in ParserOutput extension data + use it

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

These work everywhere now, but the reference previews are slightly different from legacy ... the content selection code in the reference preview code probably needs an update for Parsoid's cite output. The difference is especially obvious for named references, unless of course the new output is the preferred version. :)

I am going to leave this open for a bit to see if we can fix that as well.

Change #1019750 merged by jenkins-bot:

[mediawiki/core@master] ExtractBody: Use page title recorded in ParserOutput

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

These work everywhere now, but the reference previews are slightly different from legacy ... the content selection code in the reference preview code probably needs an update for Parsoid's cite output. The difference is especially obvious for named references, unless of course the new output is the preferred version. :)

I don’t see any difference when I hover over [3] or [1] in the first paragraph of https://en.wikipedia.beta.wmflabs.org/wiki/Cat (legacy parser, Parsoid). Could you clarify what difference you mean? Or are there any changes that are yet to hit Beta Cluster?

This is already in production now.

Take a look at https://en.wikipedia.org/wiki/Hampi_(town)?useparsoid=1 and hover over reference 3 with Parsoid and with legacy output. Similarly https://it.wikipedia.org/wiki/Luna?useparsoid=1 (reference 1)

That said, looks likes this doesn't affect huwiki.

Ah, I see. We tested two completely different pieces of software:

So the extension works as expected, and the gadget kinda works.

I am going to close this ticket and create a new one for the gadget.