Automatically recognise bare links and magic links (ISBN/etc.), and display as a link
OpenPublic

Description

Adding "ISBN 0-471-17864-0" doesn't render the ISBN as a link. This is more important in the reference tool, but should work on all rich text surfaces.

See also:

bzimport set Reference to bz52204.
jayvdb created this task.Via LegacyJul 29 2013, 12:22 AM
SalixAlba added a comment.Via ConduitAug 8 2013, 5:51 AM

I guess the other Magic links http://www.mediawiki.org/wiki/Markup_spec/BNF/Magic_links
for RFC and PMID should be included here.

Whatamidoing-WMF added a comment.Via ConduitAug 8 2013, 5:24 PM

This works for me, but perhaps not as expected.

You can add:

PMIDs: http://en.wikipedia.org/w/index.php?title=User:Whatamidoing_(WMF)/sandbox&diff=563393942&oldid=563393897

ISBNs without hyphenation: http://en.wikipedia.org/w/index.php?title=User:Whatamidoing_(WMF)/sandbox&diff=567704513&oldid=564410882

ISBNs with hyphens: http://en.wikipedia.org/w/index.php?title=User:Whatamidoing_(WMF)/sandbox&diff=567704681&oldid=567704513

Exactly like the classic wikitext editor, these do not display as being links until after they are saved. They do work correctly when saved.

After they have been saved, if you go back into VisualEditor to edit again, then the PMID and hyphenated ISBNs are not editable or clickable (except to select the whole element). Changes to them must be made by deleting the whole thing and retyping from scratch.

Clicking on the non-hyphenated ISBN, however, results in a failed attempt to go directly to the ISBN search page, with this resulting error:

Error
404 – File not found
http://en.wikipedia.org/Special:BookSources/9781234567890
We could not find the above page on our servers.
Did you mean to type http://en.wikipedia.org/wiki/Special:BookSources/9781234567890? You will be automatically redirected there in five seconds.
Alternatively, you can visit the Main Page or read more information about this type of error.

Thryduulf added a comment.Via ConduitAug 9 2013, 4:06 PM

(In reply to comment #3)

Clicking on the non-hyphenated ISBN, however, results in a failed attempt to
go
directly to the ISBN search page, with this resulting error:

Error
404 – File not found
http://en.wikipedia.org/Special:BookSources/9781234567890
We could not find the above page on our servers.
Did you mean to type
http://en.wikipedia.org/wiki/Special:BookSources/9781234567890? You will be
automatically redirected there in five seconds.
Alternatively, you can visit the Main Page or read more information about
this
type of error.

The incorrect URI is bug 48915 (it's even worse for non-English wikis as it always suggests a page on en.wp). Although I presume what is wanted is for the ISBN to be edited rather than taking you to the ISBN search page? If so then getting to that page from a right click/ctrl+click would potentially be useful.

MZMcBride added a comment.Via ConduitAug 18 2013, 1:01 AM

Magic links are pretty evil. Explicitly marking links with a parser function is much more sensible. I'm not sure supporting magic links in VisualEditor is a good idea.

jayvdb added a comment.Via ConduitAug 18 2013, 2:58 AM

(In reply to comment #5)

Magic links are pretty evil.

They are one of many unusual pieces of wiki syntax. And it is quite 'wikipedia' specific functionality which could be dropped from core.

Explicitly marking links with a parser function
is
much more sensible.

If the goal is to replace them with a more standard syntax, a 'isbn' interwiki pointing to special:booksources/$1 would be syntax that is more similar and conceptually closer also. Ideally it would render as an internal link when the interwiki points to the local special page.

I'm not sure supporting magic links in VisualEditor is a
good idea.

What is the impact of not supporting these magic links on a) big wikipedias like enwp where these magic works will often be used from a cite template (which can be changed without editing millions of pages) and b) small wikis which are imo more likely to use these magic words in raw wikitext.
I.e. How many bot edits are needed, and how many tools need to be revised.

Jdforrester-WMF added a comment.Via ConduitMar 10 2014, 10:14 PM
  • Bug 52241 has been marked as a duplicate of this bug. ***
Jdforrester-WMF moved this task to Backlog on the VisualEditor workboard.Via WebNov 24 2014, 1:26 AM
Jdforrester-WMF lowered the priority of this task from "High" to "Normal".Via WebJan 9 2015, 10:55 PM
Jdforrester-WMF changed the title from "VisualEditor: Automatically recognise bare links and magic links (ISBN/etc.), and display as a link" to "Automatically recognise bare links and magic links (ISBN/etc.), and display as a link".Via WebWed, Apr 8, 3:23 PM
Jdforrester-WMF edited the task description. (Show Details)
Jdforrester-WMF set Story Points to 8.
Jdforrester-WMF edited the task description. (Show Details)

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.