Last modified: 2014-05-22 22:47:05 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 T35569, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 33569 - "images" directory to be renamed or migrated to "files"
"images" directory to be renamed or migrated to "files"
Status: NEW
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-06 22:21 UTC by badon
Modified: 2014-05-22 22:47 UTC (History)
8 users (show)

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


Attachments

Description badon 2012-01-06 22:21:42 UTC
As discussed in IRC with ^demon, varnent, myself, sumanah, etc, a plan for migrating the "images" directory to "files" or more likely, "uploads" should be in place. ^demon has concerns about the buildup of backwards compatibility cruft, so to address that, some thought needs to be put into the issue of eventually obsolescence by gracefully driving the "images" directory to extinction. 

I propose that just one small, simple, manual change by a wiki admin is acceptable with each new upgrade, for the purpose of eliminating obsolete installations and compatibility code.
Comment 1 badon 2012-01-06 22:23:49 UTC
Here's a good example of a file path that can cause confusion for users (login with Demo/test if needed): 

http://www.coincompendium.com/w/images/5/5e/LargeBlindSubmission.csv

That's a CSV file, but the path makes people expect it to be an image.
Comment 2 varnent 2012-01-06 22:29:24 UTC
I believe that badon and ^demon bring up good points.

I've had enough end-users complain about the images folder to change the setting on some wikis before.  Not always the most tech-savy end-users sure, but we don't get to set the skill level of our readers (sadly).

I haven't done a sampling or thought to ask before now, but I would not be surprised to learn that new sysadmins have run into problems not understanding this.  I have scratched by head about it several times and now that others have too, whether they'd admit to it actually causing them problems...not sure...but can check.

Similarly, as more and more other open-source projects begin to standardize terms like "uploads" and "themes" - anyone coming into MW work has a handicap in that our terms and setup are unique.  Moving towards standard language has a lot of advantages for long-term developer recruitment and ease of support for third-party wiki sysadmins.

At the same time, upgrading third-party wikis seem infamous for not reading the upgrade notes.  So I think the actual setting would need to be backward compatible - and probably remain that way for several versions to come (if not forever, or until "2.0").
Comment 3 badon 2012-01-06 22:35:31 UTC
I bet the confusion increased for users whose first language is not English. In addition, now that I think about it, I prefer "files" over "uploads" just because of the way the URL path will read. For example

http://www.somewiki.com/w/files/5/5e/download_this_file.xyz

versus:

http://www.somewiki.com/w/uploads/5/5e/download_this_file.xyz

A user looking at the file path may be confused as to whether the link lets them download, or asks them to upload. So, I think the neutral "files" word is a better choice than "uploads", and also happens to match the files namespace for even more consistency and clarity.

I'm going to rename the title of this to match that, if everyone agrees "files" is a better alternative to explore than "uploads".
Comment 4 varnent 2012-01-06 22:36:42 UTC
Regarding files vs. uploads - I'd favor whichever seems to be most common in projects right now - which I think is uploads - but I could be wrong.  :)
Comment 5 Chad H. 2012-01-06 22:41:34 UTC
The major place I see people getting confused right now is the error messages relating to "public" because people have *zero* clue what that means. That should be fixed regardless of what we decide here (and it's bug 13812)
Comment 6 Bawolff (Brian Wolff) 2012-01-06 22:52:45 UTC
Unless backwards compatibility is maintained, I feel changing this would result in orders of magnitude more confusion than any confusion caused by the current name of the directory. (and backwards compatibility for something like this would probably be kind of ugly)

There's even a README in the image directory to explain what it is. Its not like we're putting uploaded files in a directory whose name is logically disconnected from the action of uploading.

As an aside, according to [[manual:$wgUploadDirectory]] we used to use uploads directory until about 1.8.

Making breaking changes with almost no benefit = bad imho.
Comment 7 badon 2012-01-06 22:59:59 UTC
I think the benefit is dependent on who you ask. If I had a site for videos, I'd be annoyed that every link said they were "images". Same goes for anything that's not an image, which is a non-trivial use-case.

I'm sure this is something that will have to be changed eventually, even though it may not be urgent. My usage of MediaWiki does not hinge on this issue, but even I would appreciate the change, as long as it was done carefully, with due respect for upgraders.
Comment 8 Bryan Tong Minh 2012-01-07 10:59:28 UTC
This can trivially be solved without breaking backwards compatibility by letting the installer add $wgUploadDirectory to LocalSettings.php for new installs. I agree with Bawolff that making this a breaking change would be unacceptable.
Comment 9 badon 2012-01-08 20:24:44 UTC
That sounds like a quick and easy solution. I'm in favor of that solution, for new installations. Any more opinions about what we should call it? Varnent favors "uploads", I favor "files". Any other opinions or suggestions?
Comment 10 Mark A. Hershberger 2012-01-09 20:02:48 UTC
(In reply to comment #9)
> That sounds like a quick and easy solution. I'm in favor of that solution, for
> new installations. Any more opinions about what we should call it? Varnent
> favors "uploads", I favor "files". Any other opinions or suggestions?

What if we let user specify it like the dbtable prefix and default to "files"?
Comment 11 Bawolff (Brian Wolff) 2012-01-09 20:06:14 UTC
>What if we let user specify it like the dbtable prefix and default to "files"?

We certainly could, but it seems like that'd be just adding another question that 99% of the userbase doesn't care about [which i would consider a bad thing]. (but then again I think this entire bug is an exercise of bikeshedding for an already built bikeshed, so I'm probably biased)
Comment 12 Chad H. 2012-01-09 22:42:29 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > That sounds like a quick and easy solution. I'm in favor of that solution, for
> > new installations. Any more opinions about what we should call it? Varnent
> > favors "uploads", I favor "files". Any other opinions or suggestions?
> 
> What if we let user specify it like the dbtable prefix and default to "files"?

You already *can* specify the upload directory in the installer. This is about changing the default and making sure people with current default settings work on upgrade.
Comment 13 badon 2012-01-10 02:33:21 UTC
In favor of "files", Special:SpecialPages contains these phrases:

Most linked-to files
Search for duplicate files
Upload file
Gallery of new files
File list
File path
Uncategorized files
Wanted files
Unused files
Media reports and uploads (section heading)

So, out of 2 uses of variants of the word "upload", one of them uses it as a verb instead of a noun to say "Upload file". The other uses it in combination with "Media" in a section heading. 

That's a strong precedent for the usage of variants of the word "file" instead of "upload", especially considering that we have a "File" namespace for all uploads, but not an "upload" namespace. To choose the word "upload" over "file" would probably be more confusing than "image", since all but one phrase in MediaWiki that speaks of the subject uses the word "file".

Indeed, the one phrase that doesn't use "file" - "Media reports and uploads" - probably ought to be changed to "File reports".
Comment 14 varnent 2012-01-10 04:10:29 UTC
Badon: those are fair points - and my main interest in whatever seems to be the least confusing and most commonly used.  I switch my vote from uploads to files.  :)
Comment 15 Antoine "hashar" Musso (WMF) 2012-01-13 09:37:34 UTC
By altering setup.php we could set $wgUploadPath & $wgUploadDirectory to use 'files' unless "$IP/images" exist.

Thus fresh installs will use the new 'files'. Older install will stick to 'images' on upgrade until the admin manually rename the 'images' directory to 'files'.
Comment 16 MZMcBride 2012-01-13 15:22:17 UTC
(In reply to comment #15)
> By altering setup.php we could set $wgUploadPath & $wgUploadDirectory to use
> 'files' unless "$IP/images" exist.

How would you test existence?
Comment 17 Krinkle 2012-01-13 15:33:18 UTC
Since these are configuration variable values, they have no migration path. There should be no hardcoded reference to "images" anywhere other than in the default settings setup.

We can flip the default and that's it. Existing wikis that care can change their configuration value to their liking and move their directory at will.

One thing to keep in mind is to make sure that wikis not having $wgUploadPath & $wgUploadDirectory defined in LocalSettings. I suggest the updater harcodes these to LocalSettings if they are not defined otherwise – before setting the new defaults.
Comment 18 Chad H. 2012-01-13 15:45:50 UTC
(In reply to comment #17)
> Since these are configuration variable values, they have no migration path.
> There should be no hardcoded reference to "images" anywhere other than in the
> default settings setup.
> 

We can have a migration path, see comment 15. In response to comment 16, it would be as simple as doing a file_exists() && is_dir() on 'images.' In fact, we could end up setting it to null in DefaultSettings rather than $IP/images and that'll make it easier to detect if the user's customized it (leave it alone) or to use the default behavior.

> We can flip the default and that's it. Existing wikis that care can change
> their configuration value to their liking and move their directory at will.
> 

Only that doesn't happen. People don't read the RELEASE-NOTES, they upgrade, and their wiki breaks so they file a bug. Happens every time. So this change absolutely must cause no b/c break.

> One thing to keep in mind is to make sure that wikis not having $wgUploadPath &
> $wgUploadDirectory defined in LocalSettings. I suggest the updater harcodes
> these to LocalSettings if they are not defined otherwise – before setting the
> new defaults.

See above.

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


Navigation
Links