Last modified: 2014-03-10 22:14:28 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T54204, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 52204 - VisualEditor: Automatically recognise bare links and magic links (ISBN/etc.), and display as a link
VisualEditor: Automatically recognise bare links and magic links (ISBN/etc.),...
Status: ASSIGNED
Product: VisualEditor
Classification: Unclassified
ContentEditable (Other open bugs)
unspecified
All All
: High enhancement
: ---
Assigned To: Editing team bugs – take if you're interested!
:
: 52241 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-29 00:22 UTC by John Mark Vandenberg
Modified: 2014-03-10 22:14 UTC (History)
11 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description John Mark Vandenberg 2013-07-29 00:22:17 UTC
Adding "ISBN 0-471-17864-0" doesnt render the ISBN as a link.  This is more important in the reference tool, but should work on all richtext surfaces.
Comment 2 Richard Morris 2013-08-08 05:51:08 UTC
I guess the other Magic links http://www.mediawiki.org/wiki/Markup_spec/BNF/Magic_links
for RFC and PMID should be included here.
Comment 3 WhatamIdoing 2013-08-08 17:24:38 UTC
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.
Comment 4 Chris McKenna 2013-08-09 16:06:45 UTC
(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.
Comment 5 MZMcBride 2013-08-18 01:01:01 UTC
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.
Comment 6 John Mark Vandenberg 2013-08-18 02:58:48 UTC
(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.
Comment 7 James Forrester 2014-03-10 22:14:12 UTC
*** Bug 52241 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links