Times:2026 may 25 Upgraded Castle of Dreams

From Robupixipedia
Revision as of 18:23, 25 May 2026 by Rob (talk | contribs) (link to Castle wiki)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The Castle of Dreams (the Nim-and-Rob wiki at thunderrabbit.com) was upgraded from MediaWiki 1.39.17 to 1.43.8 on 25 May 2026 by Rob, working with WikiBoo. The Castle is a Vector-skin MediaWiki rebuild of the Castle of Dreams BBS — Nim's creation, the birthplace of Rob's "Thunder Rabbit" handle, and the home of one custom extension, NavigationForPagesAsRooms, that turns wiki pages into BBS-style rooms with exit links.

Context: the second wiki

The Castle is the second of two MediaWiki upgrades. Robupixipedia (wiki.robnugen.com) went first the day before, as the dress rehearsal. The Castle has more plugins, an older LocalSettings.php with more accumulated custom directives, and — until earlier this month — a database lock that made the wiki read-only to visitors. By 25 May the lock had been replaced with a file-toggle read-only mechanism (issue #218), the wiki was caught up within the 1.39 long-term-support series to 1.39.17 (issue #220), and a series of preparatory scripts had been ported across from Robupixipedia.

The 1.43 jump (#212)

The cross-major-version jump followed the same regenerate-and-merge pattern as Robupixipedia's, with one new twist: this time the MediaWiki 1.43 web installer was driven by a Playwright script rather than clicked through by hand. The spec navigates the installer's eight pages (Language → Welcome → DBConnect → Upgrade → DBSettings → Name → Install → Complete), fills the form fields, clicks Continue at each step, and captures the generated LocalSettings.php via Playwright's download event into test-downloads/LocalSettings-1.43-fresh.php. The fresh file was then diff'd against the live LocalSettings.php, and only one new directive from the 1.43 baseline was adopted — $wgDBssl = true, after first confirming that DreamHost's shared MySQL host supports TLS (TLS 1.3 with AES-256-GCM, verified via mysql --ssl-mode=REQUIRED -e "STATUS").

A discovery worth recording: the installer's Upgrade page is not a wait-and-confirm page; it is the schema migration. Clicking Continue on its initial state runs the equivalent of maintenance/update.php in-band, server-side. After that, the page refreshes into a post-migration state with a Regenerate LocalSettings button. So the Castle's 1.43 jump did NOT need a separate update.php step afterwards — the installer had already done it. Robupixipedia's earlier upgrade had run the redundant step too, harmlessly.

All seven Castle Playwright health checks passed against the new version, including the test that the <navigation/> tag still renders Dragon_run-way's exits.

Follow-ups

Once the jump was stable, a string of smaller tickets were closed:

  1. Hardening script port (#230). The Apache images/.htaccess hardening originally written for Robupixipedia was ported to the Castle as scripts/apply-htaccess-hardening.sh. The Castle's version keeps past-Rob's URL-style BEGIN/END marker block and the existing IfModule php_module engine-off block.
  2. Bookend script modernization (#231). The old bookend_upgrade.sh, which had hard-coded a two-phase prep/post dance around composer, was rewritten as begin_upgrade.sh: the PHP pin moved to /usr/local/bin/php-8.2, composer was dropped entirely (vendor is a tracked submodule on the Castle, so there is no composer step to run), and the tail of the script was split into a same-major catch-up path and a major-version-jump path.
  3. Upgrade plan overhaul (#232). project_upgrade.md's front matter was rewritten to reflect the now-completed first two phases and to lay out the phase-four plugin-revival arc.
  4. Backup script modernization (#228). The Castle's ~/rob_backup.sh on the server was modernized to read its database password from ~/.my.cnf rather than carrying it inline. A long-standing dead-code block — a never-dumped PERMALINKS_DB_FNAME variable that the Castle had inherited from Robupixipedia's two-database script — was removed; the Castle has only one database.
  5. Tarball cleanup (#229). A 144K safety-net tarball from the image-symlink untangle work was deleted from the server, as the 1.43 jump had proven stable and no rollback path was needed.
  6. Internal-link URL form (#233). A small visible bug was filed as "NFPaR is generating the wrong URLs." Diagnosis: NFPaR was innocent. The Castle's user-facing URLs are short-form like /castle/Dragon_run-way (via an Apache rewrite rule that has been in .htaccess since 2009), but every internal wikilink in the wiki was rendering as /w/index.php?title=Foo. The cause was a single missing setting: $wgArticlePath in LocalSettings.php. Adding $wgArticlePath = "/castle/$1" flipped every internal link site-wide to the short form. NFPaR's own code was untouched.

Findings worth recording

Two patterns from the day:

  • The "extension is rendering wrong URLs" anti-pattern. MediaWiki extensions typically emit wikilinks and let MediaWiki core generate the actual HTML <a href>. So when an extension's output appears to have wrong URLs, the suspect is almost always core URL configuration ($wgArticlePath, $wgScriptPath, the rewrite rules), not the extension. Confirmed today by checking a non-extension page (The Castle Entrance) and finding the same wrong URLs there.
  • The two-mechanism dance for short URLs. Short URLs like /castle/Foo need agreement between two unrelated systems: an Apache rewrite (translates inbound /castle/Foo requests to /w/index.php?title=Foo) and $wgArticlePath in LocalSettings.php (tells MediaWiki to emit links in that form). The Castle had had the Apache half for fifteen years and had been silently missing the LocalSettings half the whole time.

End state

The Castle of Dreams is now serving MediaWiki 1.43.8 with PHP 8.2.30 on DreamHost shared hosting, with TLS-encrypted database traffic, modernized backup and bookend scripts on the server, and every internal wikilink rendering as a clean /castle/Foo URL. The next major piece of work is reviving the plugin set — the navigation redesign (#237), the missing-room reconciliation against the Guegel Sets list (#238), a couple of bot accounts (#239), and an auto-generated castle map (#236).