Board Thread:Support Requests - Getting Technical/@comment-45310000-20200418011510

I suppose you are all sick of me, and think that fool doesn't know what he is talking about, but hear me out.

As I am relatively new to the world of MediaWikia, I noticed something that I think is an anachronism. You all probably have lived with it all these years, and think nothing of it. What I am referring to is the strong typing in the naming of objects in the File: namespace. There's some code there that insures that the title of the object carries the file extension corresponding to the internal format of the image file that was uploaded. When you attempt to move such a file and remove the extension, that code forbids you from doing it.

I've already seen this manifest itself as a bug in UCP, in that uploading a YouTube file by link doesn't need an extension tacked onto the title, but when you attempt to move it, it requires that you match this extension that it never had in the first place. I assume the link from YouTube was added much later than the original implementation.

So I reported that bug, and I also sent in the suggestion that they completely dump that typing code, because as I see it, once it is in the file system, and it is a format recognized by the MediaWiki engine, almost nobody is going to care about what the internal format specification is of the image file. You can go look at the metadata for the object if you really care. You have a nebulous thing that you want to display in a box on an article page, and forcing you to specify that the underlying internal format is .jpg in the title is ludicrous (IMHO).

The reason I am bring this up is that I butted heads with this anachronism in implementing a default article image system. The way I would like it to work is that there exists a corresponding file in the 'File:' namespace, based on the title of the Article that is displayed in default position floating to the right of the article with a floating, out-of-the-way TOC below it.

Now, if that File: object doesn't exist, a broken file image redirect is displayed at the top of the article in text, and the article writer should simply be able to click on it, and upload the image for the article. However, I didn't think it proper to force that image to be a .jpg and be named that way using a Windows old-MS-DOS-based-8.3 anarchisticly named file extension.

So I came up with a workaround by instructing the user to create a File: system redirect that doesn't require the extension used by ultimate target, but it requires a document coded for humans to make it work. If you want to take a look at my implementation, it is here: w:c:rdrii:Template:ArticleImage and freely available by CC-BY-SA.

Now if I have missed something, and there is good reason why that must-match-the-internal-file-format-extension code is there, please let me know. Otherwise, you can help by making mention of it to the Fandom support that they need to surgically remove this anarchistic cancerous tumor of code from UCP before it causes more problems.

That is all. Rant mode off. 