From 01b357eea1f6b3d6f9e0ff93b9057321b7cfe105 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 2 Sep 2026 18:20:32 +0000 Subject: [PATCH] chore: repair the settings load order WikvenSiteUrl needs SiteConfig::lint() reads a site's WikvenSiteUrl through SiteUrl, and ran twenty lines above the require_once that loads it, so any site that actually set the value fataled at LocalSettings time. CI never saw it: the path is behind `$siteUrl !== ''` and no test site set one, so the setting was broken on its only non-default path with every check green. docs/.wikven.yaml now names the documentation site's own URL, which puts that path in every bake CI runs and fills $wgCanonicalServer besides. Deliberately not a fix: the defect was introduced by #621 and #621 has not been released, so nobody running 1.0.0 ever had it. Typed as a chore so release-please keeps it out of 1.1.0's notes, where a "Bugfixes" line would describe a bug no released version carried. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_019ghEx26MRm9V5CnCLrdUQn --- docs/.wikven.yaml | 5 +++++ includes/WikvenSettings.php | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/.wikven.yaml b/docs/.wikven.yaml index 34d0c4316..a3cc65d63 100644 --- a/docs/.wikven.yaml +++ b/docs/.wikven.yaml @@ -16,6 +16,11 @@ skins: - Citizen - MinervaNeue config: + # Where this site is served from. Nothing in a build can work this out for itself: it renders + # against a local server and links every page relatively, which is what lets an export run from + # any directory and any host. Anything that has to name a page from outside the site is built + # from this. + WikvenSiteUrl: https://chaotic-ground.github.io/wikven/ WikvenFooterUrl: https://github.com/chaotic-ground/wikven WikvenEditUrl: https://github.com/chaotic-ground/wikven/edit/main/docs/$1 WikvenHistoryUrl: https://github.com/chaotic-ground/wikven/commits/main/docs/$1 diff --git a/includes/WikvenSettings.php b/includes/WikvenSettings.php index 673be8952..65c6ff721 100644 --- a/includes/WikvenSettings.php +++ b/includes/WikvenSettings.php @@ -155,8 +155,11 @@ // Load config: default.yml then the site file via $wgSettings; ext/skin lists loaded leniently. global $wgSettings; -// Autoloader not active yet at LocalSettings time; load the helper directly. +// Autoloader not active yet at LocalSettings time; load the helpers directly. SiteUrl belongs here +// rather than beside its other use below: lint() reads a site's WikvenSiteUrl through it, and that +// runs a few lines down from here. require_once "$IP/extensions/Wikven/includes/SiteConfig.php"; +require_once "$IP/extensions/Wikven/includes/SiteUrl.php"; // Pick the highest-precedence config name present; warn about any others. $wikvenLocated = MediaWiki\Extension\Wikven\SiteConfig::locate($wikvenSrc); @@ -198,9 +201,6 @@ // Push merged config into globals so the logo handling below reads final values. $wgSettings->apply(); -// Autoloader not active yet at LocalSettings time; load the helper directly. -require_once "$IP/extensions/Wikven/includes/SiteUrl.php"; - // Core keeps a site's address in two halves -- $wgCanonicalServer is scheme and host, a path lives // elsewhere -- and a site should not have to write it twice. It writes WikvenSiteUrl once and this // hands core the half core understands, so an absolute URL core or any extension builds names the