Page MenuHomePhabricator

Can not copy and paste links to non-existent files
Open, Needs TriagePublic

Description

Reproduce:

Event Timeline

I can't reproduce this. Do you have any more details about your setup / actions?

That one works for me, thanks!

On investigating a bit, this is happening because during the convert-to-wikitext process there's enough metadata there that the first link gets picked up as a MWInlineImageNode (it's a span, with a typeof containing mw:Error), but our handling for that is throwing away the contents.

It looks like this is a side-effect of the fix for T337438 -- we're abandoning early for error legacy-parser content, rather than coping with the error text.

Enjoyably, we're also broken if you try to paste in parsoid markup, but differently. In that case it gets a lot further, but fails when ve.ce.MWWikitextClipboardHandler.prototype.afterPasteInsertExternalData trims everything down to plaintext.

For the latter part, note that it's behaving exactly the same as if you'd tried to copy-paste a non-missing image. It'd probably make sense if we improved that as well -- we have everything we need to turn that into wikitext.