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'; }