Last modified: 2010-08-08 06:37:31 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 T17470, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 15470 - JavaScript still tries to capitalise the first letter
JavaScript still tries to capitalise the first letter
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Uploading (Other open bugs)
1.13.x
All All
: Normal trivial (vote)
: ---
Assigned To: Chad H.
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-04 10:28 UTC by Volodya
Modified: 2010-08-08 06:37 UTC (History)
6 users (show)

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


Attachments
make capitalization in upload.js conditional on $wgCapitalLinks (1.34 KB, patch)
2010-04-20 02:07 UTC, Lee Worden
Details

Description Volodya 2008-09-04 10:28:59 UTC
Even though i have explicitly set the wiki to '''not''' force the first letter to be capital, when i select the file for the upload the JavaScript on that page changes Destination filename to have the first letter capital. This is confusing and goes against the rules which i (as an administrator) set.
Comment 1 Chad H. 2008-09-04 12:21:42 UTC
I'll take this. Shouldn't need to force capitalize (as Title cleans it up later before adding it to the database anyway...), but I'd like to double check.

For reference: line 135 of upload.js as of r40429.
Comment 2 Chad H. 2008-09-04 21:31:39 UTC
When setting $wgCapitalLinks to true and removing the offending uppercase-always JS, it works as expected. However, with this removed, attempting to upload a lower-cased file on a $wgCapitalLinks-enabled wiki (ie: standard practice) generates an error that the title must be capitalized. While this is easily fixable (and in fact can be done automatically), I don't like seeing the extra un-needed step (where previously it was transparent, the box capitalized it _for_ you).

To get around this, wgCapitalLinks might be worth adding to the list of global JS variables we provide, so Javascripts can more accurately work with capitalizing the first-letter as needed. Thoughts?
Comment 3 Chad H. 2009-01-13 00:19:00 UTC
Done as part of a general cleanup in r45689
Comment 4 Brion Vibber 2009-01-14 20:04:46 UTC
Partial revert in r45745: This made the auto-filled destination file name no longer match what we would actually upload as. It would be better to make it *more* accurate (handling normalization of forbidden chars) rather than less accurate.
The particular problem of bug 15470 should be resolved by actually checking how normalization should proceed, not by failing to do it.

The attempt to avoid the warning for auto-capitalization is now actually working in r45744.
Comment 5 Subfader 2009-03-17 14:31:17 UTC
First letter in the destination filename field is still capped with $wgCapitalLinks = false;
Comment 6 Jean-Francois Gariepy 2009-08-14 05:30:18 UTC
Hi, is there someone currently working on that bug ? In MW 1.15, I still have that problem, and it's important for me to keep the case lower for the first letter of the filename when the uploader upload a lowercase file. Setting $wgCapitalLinks = false; does not stop the files from being capitalized.
Comment 7 Bryan Tong Minh 2010-04-16 13:34:57 UTC
I would personally prefer to have the normalization done server side. We are doing a request anyway to check existence, so trying to embed the normalization in that should not be a problem.
Comment 8 Lee Worden 2010-04-20 02:07:10 UTC
Created attachment 7312 [details]
make capitalization in upload.js conditional on $wgCapitalLinks

This patch doesn't change anything server-side, only makes upload.js not do the capitalization when it's not called for.
Comment 9 Max Semenik 2010-08-08 06:37:31 UTC
Fixed in r70669. I didn't use the patch from this bug because we now have a per-namespace capitalization settings.

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


Navigation
Links