Page MenuHomePhabricator

Sub-referencing doesn't work properly in VisualEditor on pages using {{reflist}}-style templates
Closed, DuplicatePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:
Nothing.

What should have happened instead?:
Edit the template defined in the ref:

<ref name="filozofia 2001, t1" details="s. 234–345" >{{Cytuj książkę | tytuł = Filozofia matematyki, t.1 | rok = 2001 }}</ref>

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Seems broken even when this is the only ref on the page:

obraz.png (890×484 px, 52 KB)

Similar example used to work fine and still works fine here:
https://de.wikipedia.org/w/index.php?title=Benutzer:Nux/test/podprzypisy&veaction=edit

Not sure what is the difference here?

Event Timeline

The issue is not about using templates within sub/main references, it would also occur with basic references. Your plwiki test page uses {{Przypisy}} instead of <references /> As we discussed on meta sub-referencing isn't ready to deal with {{reflist}}-style templates in VisualEditor. T397501 documents the technical work required to make sub-referencing work with such templates.

Oh, I see what you meant now. That's unfortunate. I thought the problems with editing subrefs are the same as for editing refs in defined in templates.

We did replace this:

{{Reflist|refs=
<ref name="Example">Main ref content</ref>
}}

With:

<references>
<ref name="Example">Main ref content</ref>
</references>

The template does exist though and we do use it without parameters. Not sure if I can remove it completely. The template is widely used...but I'll try to think of something.

Any guess on when would something like below work with VE?

<ref name="test" details="s. 234–345" >''Some Book Title'', 2026</ref>

{{Reflist}}

I'm very sorry for the miscommunication, I could have noticed that by just checking pl:Szablon:Przypisy myself.

Replacing the template when using list-defined references certainly made things better, but until T397501: [Epic] Fix issues with {{reflist}} or missing references lists and main+details sub-references is done there will always be issues with the template due to the way sub-reference content is currently stored when using VisualEditor. Fixing that is our main priority to enable global rollout, but it will likely take at least ~2 months to finish that task.

You used a bot (or a script?) to clean up the usage of {{Przypisy|refs=...}} on plwiki correct? Would it be an option to run that bot on all pages added to pl:Kategoria:Strony korzystające z podprzypisów to replace {{Przypisy}} with <references />?
My assumption is that this would mitigate the issue to a tolerable degree. Based on our user research and observations from dewiki most sub-reference usage happens in wikitext. If the bot edited the article shortly after someone added a sub-reference, there wouldn't be any issues for consecutive VE edits?
There are also no issues editing sub-ref / main reference content when adding a sub-reference for the first time in VE as long as the edit session continues – only after saving the page VE users would see the issue when editing the page a second time (which would be fixed by the bot switching to <references /> in the meantime).
That would just leave the issue of VE users switching to wikitext after adding sub-references and then switching back to VE in the same edit session (no chance for the bot to change something), but those users would probably be able to help themselves...

What would it take for the community to consider deprecating the template entirely? Are there missing features in <references />? Anything we can support with?

I will also leave a reply on Wikipedia:Kawiarenka/Ogólne where this should probably be discussed by the broader community. If none of the suggestions work for the community and we don't come up with another solution, we are of course prepared to rollback the deployment of sub-referencing to plwiki.

Johannes_Richter_WMDE renamed this task from Editing ref templates doesn't work for subreferences to Sub-referencing doesn't work properly in VisualEditor on pages using {{reflist}}-style templates.Feb 26 2026, 1:48 PM