Issue
- Visit https://dag.wikipedia.org/wiki/Dagbamba
- Select and copy a reference in read mode
- Launch VE
- Paste the reference.
- Observe a reference is pasted, but it has no data - an error message states that the reference is defined in a template, and it serialises to an empty reference in wikitext </ref>
Backgorund
Currently references copied from read mode are discarded as they don't include enough information to rebuild the reference (they only contain <sup>[1]</sup>).
With the release of Parsoid HTML (e.g. on dag.wikipedia.org) we do know have the information available on the page, although a simple native browser copy will not work as the reference node itself only contains a pointer to the reference data, which is actually stored in the reference list.
Solutions
There are two options, we should probably do both in order
- (simple) Ensure that these 'broken' references are not pasted in VE, and instead are discarded. This maintains the status quo with references copied from legacy parser output.
- (harder) Add copy-handling code to read mode that ensures copied references are populated with their contents.