fix: use string client values per Joomla update spec #611

Closed
jmiller wants to merge 0 commits from fix/client-tag-strings into main
Owner

Reverts client tag from numeric 0/1 to string site/administrator per Joomla update server spec.

Reverts client tag from numeric 0/1 to string site/administrator per Joomla update server spec.
jmiller added 1 commit 2026-06-12 00:32:21 +00:00
fix: use string client values (site/administrator) per Joomla update spec
Universal: Auto Version Bump / Version Bump (push) Successful in 7s
Generic: Repo Health / Site Health (push) Has been skipped
Generic: Repo Health / Access control (push) Successful in 3s
Branch Policy Check / Verify merge target (pull_request) Failing after 1s
Universal: PR Check / Branch Policy (pull_request) Failing after 1s
Generic: Repo Health / Access control (pull_request) Successful in 1s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Universal: PR Check / Validate PR (pull_request) Failing after 10s
Generic: Project CI / Lint & Validate (pull_request) Successful in 27s
PR RC Release / Build RC Release (pull_request) Failing after 1m28s
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Successful in 55s
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Generic: Project CI / Tests (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
Branch Cleanup / Delete merged branch (pull_request) Has been skipped
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Universal: Build & Release / Promote to RC (pull_request) Has been skipped
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been skipped
c2687a2595
Joomla's update server documentation specifies <client> should be
"site" or "administrator" strings, not numeric 0/1. Joomla's XML
parser handles the string-to-integer mapping internally.

Co-Authored-By: Moko Consulting <hello@mokoconsulting.tech>
jmiller closed this pull request 2026-06-12 00:32:33 +00:00
jmiller deleted branch fix/client-tag-strings 2026-06-12 00:32:34 +00:00
jmiller reopened this pull request 2026-06-12 00:33:02 +00:00
jmiller closed this pull request 2026-06-14 03:01:13 +00:00
jmiller deleted branch fix/client-tag-strings 2026-06-14 03:01:14 +00:00
Author
Owner

Critical: <client> tag breaks package update detection in Joomla 6

Root Cause (traced through Joomla 6.1.1 source)

ExtensionAdapter.php line 62 — when parsing the update XML feed, the default client_id is hardcoded to 1 (administrator):

$this->currentUpdate->client_id = 1;

ExtensionAdapter.php lines 308-318 — the <client> tag is resolved:

  • <client>administrator</client>client_id = 1
  • <client>site</client>client_id = 0
  • Omitted → defaults to client_id = 1

PackageAdapter.php line 548 — packages are always stored with client_id = 0:

$this->extension->client_id = 0;

Updater.php lines 362-380 — the update finder matches by exact (element, type, client_id, folder):

$eid = $extension->find([
    'element'   => $current_update->element,
    'type'      => $current_update->type,
    'client_id' => $current_update->client_id,
    'folder'    => $current_update->folder ?? '',
]);

The Problem

The MokoGitea feed generator emits <client>administrator</client> for ALL extensions including packages. This causes:

  1. Feed parsed → client_id = 1 in #__updates
  2. Package stored → client_id = 0 in #__extensions
  3. Updater match → 1 != 0extension_id stays 0
  4. UI → update never shows

Required Fix

Extension Type <client> value client_id
component administrator 1
package site 0
plugin site 0
module (admin) administrator 1
module (site) site 0
library site 0
file site 0

Affected

pkg_mokosuitehq confirmed — updates never show despite valid feed. Potentially ALL package-type extensions using MokoGitea update feeds.

## Critical: `<client>` tag breaks package update detection in Joomla 6 ### Root Cause (traced through Joomla 6.1.1 source) **`ExtensionAdapter.php` line 62** — when parsing the update XML feed, the default `client_id` is hardcoded to `1` (administrator): ```php $this->currentUpdate->client_id = 1; ``` **`ExtensionAdapter.php` lines 308-318** — the `<client>` tag is resolved: - `<client>administrator</client>` → `client_id = 1` - `<client>site</client>` → `client_id = 0` - **Omitted** → defaults to `client_id = 1` **`PackageAdapter.php` line 548** — packages are always stored with `client_id = 0`: ```php $this->extension->client_id = 0; ``` **`Updater.php` lines 362-380** — the update finder matches by exact `(element, type, client_id, folder)`: ```php $eid = $extension->find([ 'element' => $current_update->element, 'type' => $current_update->type, 'client_id' => $current_update->client_id, 'folder' => $current_update->folder ?? '', ]); ``` ### The Problem The MokoGitea feed generator emits `<client>administrator</client>` for ALL extensions including packages. This causes: 1. Feed parsed → `client_id = 1` in `#__updates` 2. Package stored → `client_id = 0` in `#__extensions` 3. Updater match → `1 != 0` → `extension_id` stays `0` 4. UI → update never shows ### Required Fix | Extension Type | `<client>` value | `client_id` | |---|---|---| | component | `administrator` | 1 | | package | `site` | 0 | | plugin | `site` | 0 | | module (admin) | `administrator` | 1 | | module (site) | `site` | 0 | | library | `site` | 0 | | file | `site` | 0 | ### Affected `pkg_mokosuitehq` confirmed — updates never show despite valid feed. Potentially ALL package-type extensions using MokoGitea update feeds.

Pull request closed

This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.