Page MenuHomePhabricator

Wikilinks in author field break {{information}} template.
Closed, ResolvedPublic

Description

When uploading your own work (at least, not tested otherwise) including wikilinks in a custom string for the "author" field breaks the resulting {{information}} template.

e.g. I uploaded a file and tried to use my usual attribution: <nowiki>Chris McKenna ([[user:Thryduulf|]])</nowiki>, not realising that a link to my user page would be automatically applied. See:
http://commons.wikimedia.org/w/index.php?title=File:Voith_Schneider_propeller_on_Woolwich_Ferry.JPG&oldid=68926869

Solution 1:

  • Check if wikilinks are included in string

If present, do not add any links.
If not present, add link as presently

Solution 2:
*Check if Wikilinks are included in string.
If present, check whether target is the same as wizard would link to
*If yes, do not add any links.
***If no, append link to string (e.g. "([[user:]])")


Version: unspecified
Severity: normal

Details

Reference
bz35520

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:18 AM
bzimport added a project: UploadWizard.
bzimport set Reference to bz35520.
bzimport added a subscriber: Unknown Object (MLST).

Chris, I think the current input tries to make it very clear about what we expect....the title= attribute of it says to enter your real name or your user name. None of that indicates, to me, that you should put wikitext into it....

Would it really be that helpful to include the ability to add custom links? That could potentially be used for other purposes, and I think it's pretty much necessary to keep the author= attribute as used for only author names.

Perhaps we should go the other way, at least, and error out if we find that the wikitext is broken, letting the user know that they've angered the parser gods? Does anyone else have thoughts about this?

I can see your point about allowing custom links, but I can see value in allowing the inclusion of real name AND username (maybe just because that's what I do, I don't know how common it is).

An alternative would be to have two check boxes, the first next to a text-entry field for real name, the second would use your username.

If neither option was checked, or the real name option was checked but the text field was blank then an error would occur.

If only the real name option was checked and a real name supplied, that name with a link to the userpage would be used as now.

If only the username option was checked, then that name with a link to the userpage would be used.

If both options were checked, then "Real name ([[user:username|username]])" would be used.

I haven't a clue how easy to implement this would be though.

Chris, that's pretty complicated, but the current implementation still seems like the best one, to me. For the following examples, the username is "Newbie", the real name is "New Person".

Option 1: Enter your username, there will be a link to your user page like so: |author=[[User:Newbie|Newbie]]

Option 2: Enter your real name, there will be a link to your user page like so: |author=[[User:Newbie|New Person]]

The only other option is to actually show _both_ your real name _and_ your username, but that's largely the same as option 2, except that your username wouldn't be visible without viewing the URL....

Plus, these options help us avoid the complication of creating new fields for people to fill out. Really, the only thing we're after is a concrete statement of release for copyright purposes, so this should do just fine. Further attribution details could just as easily go into the description in the details page, which _is_ equipped to deal with WikiText, or into the file page after the upload process is completed.

The problem of the information template is not with wikilinks being there but that you wrote [[user:Thryduulf|] instead of [[user:Thryduulf|]]. That's what broke the information template, not the wikilinks (the author field would still have problems, but not the whole template).

Beside that note, I see no problems with implementing the proposal of comment #1. Your name is not expected to contain "[["! :)

Platonides, good eye! Sorry about the misunderstanding, Chris!

I'll look into adding some more error checking to that field.

Change merged by exercising newly obtained merge rights :)

Gilles raised the priority of this task from Medium to Unbreak Now!.Dec 4 2014, 10:27 AM
Gilles moved this task from Untriaged to Done on the Multimedia board.
Gilles lowered the priority of this task from Unbreak Now! to Medium.Dec 4 2014, 11:22 AM