From 81351f45fd1c483f784f22f3ea3b919a9dcce512 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Mon, 25 May 2026 22:49:51 -0500 Subject: [PATCH] =?UTF-8?q?fix:=20updates=5Fxml=5Fbuild=20=E2=80=94=20tag?= =?UTF-8?q?=20'dev'=20not=20'development',=20client=20for=20all=20types?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two root causes of Joomla updater not finding MokoWaaS updates: 1. stabilityTagToInteger('development') looks for STABILITY_DEVELOPMENT which doesn't exist → defaults to STABLE. Changed to 'dev' which maps to STABILITY_DEV (0). 2. Missing tag defaults to client_id=1 (administrator) in Joomla's ExtensionAdapter. Packages install with client_id=0 (site). Now adds site for all extension types. Fixes: #129 Authored-by: Moko Consulting Co-Authored-By: Claude Opus 4.6 (1M context) --- cli/updates_xml_build.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cli/updates_xml_build.php b/cli/updates_xml_build.php index 44ec33b..106d8e6 100644 --- a/cli/updates_xml_build.php +++ b/cli/updates_xml_build.php @@ -194,12 +194,14 @@ $stabilitySuffixMap = [ 'development' => '-dev', ]; +// Joomla's stabilityTagToInteger() maps these to STABILITY_* constants. +// MUST use 'dev' not 'development' — STABILITY_DEVELOPMENT does not exist. $stabilityTagMap = [ 'stable' => 'stable', 'rc' => 'rc', 'beta' => 'beta', 'alpha' => 'alpha', - 'development' => 'development', + 'development' => 'dev', ]; // -- Build update entries ----------------------------------------------------- @@ -212,11 +214,13 @@ $primaryVersion = $version . $primarySuffix; $downloadUrl = "{$giteaUrl}/{$org}/{$repo}/releases/download/{$releaseTag}/{$typePrefix}{$extElement}-{$primaryVersion}.zip"; $infoUrl = "{$giteaUrl}/{$org}/{$repo}/releases/tag/{$releaseTag}"; -// Build client tag +// Build client tag — Joomla defaults to client_id=1 (administrator) when missing. +// Packages install with client_id=0 (site), so we MUST include site +// for all types to prevent a mismatch that causes extension_id=0 in #__updates. $clientTag = ''; if (!empty($extClient)) { $clientTag = " {$extClient}"; -} elseif ($extType === 'module' || $extType === 'plugin') { +} else { $clientTag = ' site'; } -- 2.52.0