bug: package extension types not linking to installed extension in Joomla update system #482

Closed
opened 2026-06-04 22:52:32 +00:00 by jmiller · 1 comment
Owner

Problem

When MokoGitea generates updates.xml for package extension types (<type>package</type>), Joomla's update finder fails to link the #__updates record to the installed extension. The extension_id in #__updates is set to 0 instead of the correct extension ID.

This causes the update to not appear in Joomla's System > Update > Extensions view because Joomla treats extension_id=0 as a new installable extension rather than an update to an existing one.

Root Cause Investigation

Joomla matches #__updates records to #__extensions using element + type + client_id. For packages:

  • #__extensions stores packages with client_id=0
  • The generated updates.xml may be missing the <client> tag or setting it incorrectly
  • Without <client>, Joomla defaults to client_id=1 (admin) which doesn't match client_id=0 in extensions

Expected Behavior

For <type>package</type> entries in updates.xml:

  • Either omit <client> entirely (Joomla should match by element+type alone)
  • Or set <client>0</client> explicitly to match the package's client_id=0 in #__extensions

Affected Extensions

  • pkg_mokowaas (Package - MokoWaaS) confirmed affected
  • Likely affects all package-type extensions served by MokoGitea

Workaround

MokoWaaS added fixUpdateRecords() to its install script that self-heals by running:

UPDATE #__updates u
JOIN #__extensions e ON u.element = e.element AND u.type = e.type
SET u.extension_id = e.extension_id
WHERE u.extension_id = 0

Steps to Reproduce

  1. Install a Moko package extension (e.g., pkg_mokowaas)
  2. Publish a new dev release via pre-release workflow
  3. In Joomla admin, go to System > Update > Extensions
  4. Click Find Updates
  5. The update does not appear despite being in #__updates with extension_id=0

Priority

High - Blocks all package-type extensions from receiving updates through the Joomla update system.

## Problem When MokoGitea generates `updates.xml` for **package** extension types (`<type>package</type>`), Joomla's update finder fails to link the `#__updates` record to the installed extension. The `extension_id` in `#__updates` is set to `0` instead of the correct extension ID. This causes the update to **not appear** in Joomla's System > Update > Extensions view because Joomla treats `extension_id=0` as a new installable extension rather than an update to an existing one. ## Root Cause Investigation Joomla matches `#__updates` records to `#__extensions` using `element` + `type` + `client_id`. For packages: - `#__extensions` stores packages with `client_id=0` - The generated `updates.xml` may be missing the `<client>` tag or setting it incorrectly - Without `<client>`, Joomla defaults to `client_id=1` (admin) which doesn't match `client_id=0` in extensions ## Expected Behavior For `<type>package</type>` entries in `updates.xml`: - Either omit `<client>` entirely (Joomla should match by element+type alone) - Or set `<client>0</client>` explicitly to match the package's `client_id=0` in `#__extensions` ## Affected Extensions - `pkg_mokowaas` (Package - MokoWaaS) confirmed affected - Likely affects all package-type extensions served by MokoGitea ## Workaround MokoWaaS added `fixUpdateRecords()` to its install script that self-heals by running: ```sql UPDATE #__updates u JOIN #__extensions e ON u.element = e.element AND u.type = e.type SET u.extension_id = e.extension_id WHERE u.extension_id = 0 ``` ## Steps to Reproduce 1. Install a Moko package extension (e.g., pkg_mokowaas) 2. Publish a new dev release via pre-release workflow 3. In Joomla admin, go to System > Update > Extensions 4. Click Find Updates 5. The update does not appear despite being in `#__updates` with `extension_id=0` ## Priority **High** - Blocks all package-type extensions from receiving updates through the Joomla update system.
Author
Owner

Fixed in PR #488. Package types now output <client>0</client> matching client_id=0 in #__extensions. Joomla can now match updates to installed package extensions.

Verified: MokoWaaS and MokoJoomBackup both show <client>0</client> in updates.xml.

@jmiller

Fixed in PR #488. Package types now output `<client>0</client>` matching `client_id=0` in `#__extensions`. Joomla can now match updates to installed package extensions. Verified: MokoWaaS and MokoJoomBackup both show `<client>0</client>` in updates.xml. _@jmiller_
Sign in to join this conversation.
No labels
Status
Type
Status
Priority
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoGitea#482