Double colons when linking to File/Category


Article Images

VisualEditor: Double colons when linking to File/Category

Intention:
Linking to a file using visual editor

Steps to Reproduce:

  1. Edit page on using VE
  2. Click add link
  3. Enter a filename with File-prefix (e.g. File:Foo.svg)
  4. Press enter
  5. Press enter again

The same thing happens for categories or if the preceding colon is added manually.

Actual Results:

  1. Inserted text is changed to :File:Foo.svg
  2. Inserted text is changed to ::File:Foo.svg

Expected Results:

  1. As result
  2. No change

Reproducible: Sometimes

The same thing happens for categories or if the preceding colon is added manually. I can get this to happen repeatedly but occasionally VE will correctly know not to add the second colon (have not identified when though.


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=63355

Event Timeline

Created attachment 14992
Screencast

Added video since this is not 100% reproducible

Attached:

Also happening with FF, Win8.
The resulting wikilink works, though.

Here's a variation:

  1. Edit page on using VisualEditor.
  1. Type the file name you want (with or without the colon prefix that you want): File:Example.jpg
  1. Open the link inspector, which will offer to link these files (at least on en.wp):

:File:Example.jpg
File:Example.jpg
File:Example.JPG

  1. Choose the first. Press enter. Now it has changed the link target to "::File:Example.jpg" and says "Invalid page title". (Saving this link will work correctly anyway.)
  1. Alternatively, choose the second, and press enter. This also works and does not produce the error message.

Dupe of 50279 (and now fixed).

  • This bug has been marked as a duplicate of bug 50279 ***

Content licensed under Creative Commons Attribution-ShareAlike (CC BY-SA) 4.0 unless otherwise noted; code licensed under GNU General Public License (GPL) 2.0 or later and other open source licenses. By using this site, you agree to the Terms of Use, Privacy Policy, and Code of Conduct. · Wikimedia Foundation · Privacy Policy · Code of Conduct · Terms of Use · Disclaimer · CC-BY-SA · GPL · Credits