I always meant to do stuff like this with the blog: drop easy-to-read, simple, layman explanations on things I figured out with tech stuff, and maybe someone else will find it, and even find it useful…!
So I got a brand-new, fresh, vanilla MediaWiki install all finished and set up and ready to go. (No, I didn’t delete and have to reinstall the Kanzenshuu wiki!) For what it’s worth, here in December 2021, that’s MediaWiki version 1.37.0. Cool. I’m actually using this new wiki on a fresh domain name and porting over existing wiki pages from another wiki installed elsewhere (effectively a staging site someone else put together a while back).
Problem is, I import a page totally fine using Special:Export on the old wiki and Special:Import on the new wiki, except none of the references are loading at the bottom under our “Sources” header. It’s all really basic citations just listing a URL inside the <ref> and </ref> tags, and they’re showing up in-line as URLs right there in the text rather than as the nice little superscript blue notated citations.
OK, cool. So there’s an extension called Cite that automatically came as part of the MediaWiki install, and that should be handling things. It’s already there on the server from the installation right where it needs to be: in the main MediaWiki folder, then the extensions folder, and right there as Cite:
(If it didn’t come as part of your installation — I don’t know why it wouldn’t, because it’s included in the standard MediaWiki download — you can download from them and upload the extension yourself to your web server.)
So why isn’t it just automatically working?
I swear to Dende I have no idea how I missed it, because it’s right there on the extension’s page… but you have to add something to the bottom of your LocalSettings.php file (the one that MediaWiki made you download as you finished the installation… or you can FTP into your web server to download it) in order to actually turn it on and make it work. You have to add the line:
wfLoadExtension('Cite');
That was it: all I had to do is add that one line at the very bottom of the LocalSettings.php file, reupload it, and without doing anything else, citations started working as expected:
I really don’t know how I missed it listed right there as a necessary step on the extension’s own page. I was going down a rabbit hole seeing all sorts of stuff about instead having to add require_once "extensions/ExtensionName/ExtensionName.php";
… which really wasn’t helpful to me because there wasn’t actually a Cite.php file in the extension’s folder (thought there is in old versions of the extension).
Everything was right there for me, and I was just missing it. It was at the very end of a work day after I had done all of the other installations, so it was definitely just a matter of not fully reading / skimming, thinking I had it it, clearly not having it, and being too head-foggy to get it done.
Sometimes you just gotta give yourself a day, man.