[WikiToLearn Tech] The problem with lowercase files

Riccardo Iaconelli riccardo at kde.org
Fri Mar 25 16:00:35 UTC 2016


Hi all,

recently (in the past month or so) we decided to allow people to upload images 
whose name starts with a lowercase letter.

This seemed an innocuous change, but there is a nasty bug with OCG, namely, 
something in the chain of software that leads to the generation of PDFs expect 
all files to start with an uppercase letter. With the current setup, whenever 
a lowercase image is inserted, OCG either picks a random file from Wikimedia 
commons, or displays nothing at all. The web version shows images the right 
way, so the user doesn't notice the bug until the PDF is downloaded, and this 
leads to inconsistencies.

I see two ways out of this:

1) (best way) we tame and fix the OCG bug, this requires some coordination to 
find out whether it's in the latex writer, in the bundler, in Parsoid, in 
Mediawiki Core, a configuration or in the Collection extension

2) we comment out the line which allows this behiavour 
($wgCapitalLinkOverrides[ NS_FILE ] = false;), we run a bot to change the 
names to all uploaded files on pool and to fix all the references in the 
website (it's many changes, but it should be easy enough to do), dropping the 
support for lower-case images. Note that this leads to a slightly inconsistent 
behiavour, if the user wants to upload a file by inserting in the text a 
lower-cased red link first (she will create the link, upload the image (which 
will automatically get capitalized), come back to the document and figure out 
the "link" is still broken).

This is a rather urgent issue as users are complaining a lot about this, and 
it's very hard for them to understand what is going on. What route would you 
like to follow?

RFC Phabricator task: https://phabricator.kde.org/T1937

Bye,
-Riccardo



More information about the WikiToLearn-Tech mailing list