Last modified: 2013-04-22 16:15:09 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 T37520, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 35520 - Wikilinks in author field break {{information}} template.
Wikilinks in author field break {{information}} template.
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
UploadWizard (Other open bugs)
unspecified
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-27 13:16 UTC by Chris McKenna
Modified: 2013-04-22 16:15 UTC (History)
7 users (show)

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


Attachments

Description Chris McKenna 2012-03-27 13:16:51 UTC
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:]])")
Comment 1 Mark Holmquist 2012-05-30 18:45:19 UTC
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?
Comment 2 Chris McKenna 2012-05-31 21:50:09 UTC
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.
Comment 3 Mark Holmquist 2012-05-31 21:59:11 UTC
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.
Comment 4 Platonides 2012-05-31 22:05:40 UTC
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 "[["! :)
Comment 5 Mark Holmquist 2012-05-31 22:11:33 UTC
Platonides, good eye! Sorry about the misunderstanding, Chris!

I'll look into adding some more error checking to that field.
Comment 6 Derk-Jan Hartman 2012-11-11 22:27:40 UTC
https://gerrit.wikimedia.org/r/33039
Comment 7 Nischay Nahata 2013-03-23 12:49:47 UTC
Change merged by exercising newly obtained merge rights :)

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


Navigation
Links