Steps to replicate the issue:
- On a wiki with $wgEnableMagicLinks['ISBN'] = true; (e.g. dewiki or frwiki)
- Create a page using list-defined references and a valid ISBN, e.g. the following wikitext:
Test.<ref name="A1" /> == Test == Test.<ref name="A2" /> == Einzelnachweise == <references> <ref name="A1"> ISBN 978383160698 </ref> <ref name="A2"> abc </ref> </references>
- Open this page in VisualEditor
- Make any minor change and save the page
What happens?:
- List-defined references (after the first one containing an ISBN) are removed -> https://de.wikipedia.org/w/index.php?title=Benutzer%3AJohannnes89%2FTest5&diff=258094704&oldid=258094685 / https://fr.wikipedia.org/w/index.php?title=Utilisateur:Johannnes89/test&diff=prev&oldid=227424152
What should have happened instead?:
- Just the minor edit, no change to the references
- There are no issues on projects with disabled ISBN magic links like enwiki https://en.wikipedia.org/w/index.php?title=User:Johannnes89/Test&diff=prev&oldid=1301549620
Other information:
- Noticed the bug in the following dewiki articles: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 and discussed it on https://de.wikipedia.org/wiki/Wikipedia:Technik/Werkstatt#VisualEditor_löscht_list-defined_references
Notes:
Related but slightly different version of this bug T400038: VisualEditor deletes list-defined references when editing one of them also fixed with 1170800