Page MenuHomePhabricator

VE: Cannot render main content previews from inline main+details when {{Reflist}} is used
Open, Needs TriagePublicBUG REPORT

Description

Context
  • create wikitext:
<ref name="refname" details="page 4">This is a reference</ref>
==References==
{{Reflist}}
  • switch to Visual Editor

What happens?:
Visual Editor cannot display the reference and displays a warning instead

Screenshot From 2025-05-22 21-38-51.png (87×1 px, 40 KB)

Implementation

It seems that the MW metadata pointing out the synthetic ref as part of the references section is overwritten / lost we're whenever a template creates the references section. Two options to fix this

  • A find a way to add the metadata still
  • B find a way to forward the meta data missing
Notes:

The underlying issue also affects the previews in the context menu and when editing details.

Event Timeline

Works for me:

image.png (417×1 px, 38 KB)

Maybe we fixed this somehow by other code changes we did. :)

Works for me:

image.png (417×1 px, 38 KB)

Maybe we fixed this somehow by other code changes we did. :)

Could you add the Wikitext of the template used to the task description. I think that would be helpful :-). Or a link to beta / test wikipedia where this can be verified?

WMDE-Fisch renamed this task from VE: cannot display inline main+details in reference list or previews when {{Reflist}} is used to VE: Cannot render main content previews from inline main+details when {{Reflist}} is used.Jun 24 2025, 2:19 PM

Change #1165000 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/Cite@master] [WIP] Make sure synthetic refs are know with {{reflist}}

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

Change #1165468 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/Cite@master] Add parser test for main+details and the references tag

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

Change #1165468 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Add parser test for main+details and the references tag

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

Change #1168834 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/Cite@master] Parsoid: Add bodyHtml of synthetic refs from `details` to mwData

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

Change #1168834 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Parsoid: Add bodyHtml of synthetic refs from `details` to mwData

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

Change #1170079 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/Cite@master] VE: Emit fresh reflist when saving a reflist template

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

Change #1170529 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/Cite@master] [Parsoid] Add more checks to detect template wrapped references

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

The current patch shows some issues when Parsoid round tripps the filtered reflist items. We need to solve these to move forward.

Change #1170529 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Parsoid: Add more checks to detect template wrapped references

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