[SOLVED]Importing ZDoom Wiki into Local Mediawiki Instance Problems

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
User avatar
Sarah
Posts: 553
Joined: Wed Sep 06, 2006 12:36 pm
Preferred Pronouns: She/Her
Operating System Version (Optional): Artix OpenRC
Location: Middle of Nowheresville Il.

[SOLVED]Importing ZDoom Wiki into Local Mediawiki Instance Problems

Post by Sarah »

Hello! As the title says, I have been trying to setup an offline copy of the wiki on a Mediawiki instance and I am running into some problems. Specifically, I am having trouble importing the XML dump. I have tried using the import option through the site itself - that seems to fail because the dump is almost 500mb. Now I am attempting to use importDump.php. This has been more successful as I at least get some sort of error output. Apparently the import script is failing to find the XML start tag. I have included the terminal output in the spoiler below. Any ideas on what I'm doing wrong? Thank you!

The commands below are for Mediawiki versions 1.39 or lower. I have tried commands for current Mediawiki versions (what I'm running) and got the same exception. Looking at the XML, I noticed that it was exported with Mediawiki 1.39. Could the version difference be my issue?
Spoiler:
*Been a while since I formatted BBCode, so my apologies if the terminal output looks like garbage.

My Mediawiki installation specifics:
  • Mediawiki version 1.45.3
  • PHP version 8.5.6(apache2handler)
  • ICU version 78.3
  • MariaDB version 12.2.2-MariaDB
*Update
So, it appears that importDump.php was getting confused by the wiki archive. Simply extracting the xml file and using that solved my issue. Looks like things are functional enough. As I get more familiar with Mediawiki hopefully the few problems I noticed can be solved.
User avatar
Rachael
Posts: 13995
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: [SOLVED]Importing ZDoom Wiki into Local Mediawiki Instance Problems

Post by Rachael »

Thank you for posting the solution. It probably would have been better to crunch it into a 7zip file, but the tools to do that are not usually part of every Linux distro, and on the server hosting ZDoom things are intentionally kept fairly minimal. .xz is an easy format to work with, and most tools are able to work with it directly out of the box, so it did not occur to me that the compression itself was the issue.

Nevertheless, sending the archive uncompressed would have been highly impractical, so something had to be done in any event.
User avatar
Sarah
Posts: 553
Joined: Wed Sep 06, 2006 12:36 pm
Preferred Pronouns: She/Her
Operating System Version (Optional): Artix OpenRC
Location: Middle of Nowheresville Il.

Re: [SOLVED]Importing ZDoom Wiki into Local Mediawiki Instance Problems

Post by Sarah »

Not a problem :D I do like to update my posts when I solve my own issues. In this case, the information might be useful to someone else.

So, I did not think anything of the .xz extension. I made the incorrect assumption that .xz and .gz were equivalent archives. From what little research I've done, it appears that the import scripts will decompress .gz or .bz2 files. My source for that is here. I have not found a definitive list of supported archive formats; I probably haven't dug enough. Just a suggestion, if you want to continue using .xz archives, which is fine, add a note on the wiki that the xml needs extracted and imported, not the archive. Although maybe it works fine on Windows? It would be a pain for me to test unless I set up a VM.
User avatar
Rachael
Posts: 13995
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: [SOLVED]Importing ZDoom Wiki into Local Mediawiki Instance Problems

Post by Rachael »

That's actually a good idea, and yes we can add that. I don't think anything on Windows would have that support out of the box - in fact Windows is often less feature-complete than Linux is out of the box.

Return to “General”