bug: update-server.yml packages Joomla extensions as flat directories instead of nested ZIPs #167

Closed
opened 2026-05-26 19:50:11 +00:00 by jmiller · 3 comments
Owner

Summary

The update-server.yml workflow builds install packages with a naive cd src && zip -r which puts sub-extension directories flat inside the ZIP. Joomla package extensions require sub-extensions as nested ZIP files inside packages/ (e.g., packages/com_mokojoomgallery.zip).

Impact

Breaking — Joomla update installer fails with "Install path does not exist" because it expects packages/com_mokojoomgallery.zip but finds packages/com_mokojoomgallery/ (a directory).

All package-type Joomla extensions are affected.

Root Cause

update-server.yml line ~210:

cd "$SOURCE_DIR"
zip -r "/tmp/${PACKAGE_NAME}" . -x $EXCLUDES

This zips the entire src/ tree as-is. For Joomla packages, the packages/ subdirectories need to be individually zipped first, then the outer package ZIP created with those nested ZIPs.

Fix

The workflow should use cli/package_build.php from moko-platform (which already exists) instead of the inline zip command. For Joomla package extensions (<extension type="package">), package_build.php should:

  1. Detect package manifest (pkg_*.xml)
  2. Read <files folder="packages"> entries
  3. ZIP each sub-extension directory into its own .zip
  4. Build the outer package ZIP with nested ZIPs + manifest + script + languages

Affected Repos

All Joomla package-type extensions:

  • MokoJoomGallery
  • MokoJoomHero
  • MokoJoomTOS
  • MokoJoomCalendar
  • MokoJoomMembership
  • MokoJoomStoreLocator
  • MokoJoomla
  • MokoOpenGraph
## Summary The `update-server.yml` workflow builds install packages with a naive `cd src && zip -r` which puts sub-extension directories flat inside the ZIP. Joomla package extensions require sub-extensions as **nested ZIP files** inside `packages/` (e.g., `packages/com_mokojoomgallery.zip`). ## Impact **Breaking** — Joomla update installer fails with "Install path does not exist" because it expects `packages/com_mokojoomgallery.zip` but finds `packages/com_mokojoomgallery/` (a directory). All package-type Joomla extensions are affected. ## Root Cause `update-server.yml` line ~210: ```bash cd "$SOURCE_DIR" zip -r "/tmp/${PACKAGE_NAME}" . -x $EXCLUDES ``` This zips the entire `src/` tree as-is. For Joomla packages, the `packages/` subdirectories need to be individually zipped first, then the outer package ZIP created with those nested ZIPs. ## Fix The workflow should use `cli/package_build.php` from moko-platform (which already exists) instead of the inline zip command. For Joomla package extensions (`<extension type="package">`), `package_build.php` should: 1. Detect package manifest (`pkg_*.xml`) 2. Read `<files folder="packages">` entries 3. ZIP each sub-extension directory into its own `.zip` 4. Build the outer package ZIP with nested ZIPs + manifest + script + languages ## Affected Repos All Joomla package-type extensions: - MokoJoomGallery - MokoJoomHero - MokoJoomTOS - MokoJoomCalendar - MokoJoomMembership - MokoJoomStoreLocator - MokoJoomla - MokoOpenGraph
Author
Owner

Branch created: feature/167-bug-update-server-yml-packages-joomla-ex

git fetch origin
git checkout feature/167-bug-update-server-yml-packages-joomla-ex
Branch created: [`feature/167-bug-update-server-yml-packages-joomla-ex`](https://git.mokoconsulting.tech/MokoConsulting/moko-platform/src/branch/feature/167-bug-update-server-yml-packages-joomla-ex) ```bash git fetch origin git checkout feature/167-bug-update-server-yml-packages-joomla-ex ```
Author
Owner
Cross-ref: MokoConsulting/MokoJoomGallery#36
Author
Owner

Proof

Replaced 68-line inline zip+curl block in update-server.yml with release_package.php CLI call.

release_package.php correctly handles Joomla package extensions by:

  1. Detecting package manifest (pkg_*.xml)
  2. ZIPping each sub-extension dir into nested .zip files
  3. Building outer package ZIP with nested ZIPs + manifest

Pushed to:

  • Template-Joomla (dev + main)
  • 15 Joomla repos (dev + main) — 28 files updated
## Proof Replaced 68-line inline zip+curl block in update-server.yml with `release_package.php` CLI call. `release_package.php` correctly handles Joomla package extensions by: 1. Detecting package manifest (pkg_*.xml) 2. ZIPping each sub-extension dir into nested .zip files 3. Building outer package ZIP with nested ZIPs + manifest Pushed to: - Template-Joomla (dev + main) - 15 Joomla repos (dev + main) — 28 files updated
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/moko-platform#167