fix: updates_xml_build — tag 'dev' not 'development', client for all types
Generic: Repo Health / Site Health (push) Has been skipped
Generic: Repo Health / Access control (push) Successful in 3s
Universal: Cascade Main → Dev / Cascade main → branches (push) Successful in 8s
Generic: Repo Health / Release configuration (push) Successful in 11s
Generic: Repo Health / Scripts governance (push) Successful in 5s
Generic: Repo Health / Repository health (push) Successful in 15s
Platform: moko-platform CI / Gate 1: Code Quality (push) Successful in 1m25s
Platform: moko-platform CI / Gate 5: Template Integrity (push) Failing after 14s
Platform: moko-platform CI / Gate 4: Governance (push) Successful in 1m14s
Platform: moko-platform CI / Gate 2: Unit Tests (8.2) (push) Successful in 1m19s
Platform: moko-platform CI / Gate 2: Unit Tests (8.1) (push) Successful in 1m27s
Platform: moko-platform CI / Gate 3: Self-Health Check (push) Failing after 1m27s
Platform: moko-platform CI / Gate 2: Unit Tests (8.3) (push) Successful in 1m29s
Platform: moko-platform CI / CI Summary (push) Has been cancelled

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 <client> tag defaults to client_id=1 (administrator) in
   Joomla's ExtensionAdapter. Packages install with client_id=0 (site).
   Now adds <client>site</client> for all extension types.

Fixes: #129

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jonathan Miller
2026-05-25 22:49:51 -05:00
parent d0dbd1dceb
commit 81351f45fd
+7 -3
View File
@@ -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 <client>site</client>
// for all types to prevent a mismatch that causes extension_id=0 in #__updates.
$clientTag = '';
if (!empty($extClient)) {
$clientTag = " <client>{$extClient}</client>";
} elseif ($extType === 'module' || $extType === 'plugin') {
} else {
$clientTag = ' <client>site</client>';
}