bug(critical): package_build.php produces 0-byte ZIP for Joomla package extensions #92

Closed
opened 2026-05-26 00:30:20 +00:00 by jmiller · 1 comment
Owner

Bug

The pre-release workflow produces a 0-byte or broken ZIP for Joomla package extensions (type=package). The ZIP has a double-prefix (pkg_pkg_*) and empty content.

Evidence

MokoJoomGallery run #10685 (release-candidate, succeeded but broken output):

  • ZIP: pkg_pkg_mokogallery-01.00.01-rc.zip (0 bytes)
  • Double pkg_ prefix
  • Empty file

Root Cause

package_build.php does not handle Joomla package extensions correctly. For packages:

  • Sub-extensions in src/packages/*/ must be zipped individually first
  • Then bundled with the package manifest into the outer ZIP

Expected ZIP structure

pkg_mokojoomgallery-01.00.01-rc.zip
  pkg_mokojoomgallery.xml
  script.php
  language/
  packages/
    com_mokojoomgallery.zip
    plg_system_mokojoomgallery.zip
    plg_content_mokojoomgallery.zip
    plg_editors-xtd_mokojoomgallery.zip
    plg_webservices_mokojoomgallery.zip
    mod_mokojoomgallery.zip

Also fix

  • No double prefix: pkg_pkg_* should be pkg_*
  • Detect package type from <extension type="package"> in pkg_*.xml

Test

Trigger RC pre-release on MokoJoomGallery after fix and verify non-zero ZIP with correct structure.

## Bug The pre-release workflow produces a 0-byte or broken ZIP for Joomla package extensions (type=package). The ZIP has a double-prefix (`pkg_pkg_*`) and empty content. ## Evidence MokoJoomGallery run #10685 (release-candidate, succeeded but broken output): - ZIP: `pkg_pkg_mokogallery-01.00.01-rc.zip` (0 bytes) - Double `pkg_` prefix - Empty file ## Root Cause `package_build.php` does not handle Joomla package extensions correctly. For packages: - Sub-extensions in `src/packages/*/` must be zipped individually first - Then bundled with the package manifest into the outer ZIP ## Expected ZIP structure ``` pkg_mokojoomgallery-01.00.01-rc.zip pkg_mokojoomgallery.xml script.php language/ packages/ com_mokojoomgallery.zip plg_system_mokojoomgallery.zip plg_content_mokojoomgallery.zip plg_editors-xtd_mokojoomgallery.zip plg_webservices_mokojoomgallery.zip mod_mokojoomgallery.zip ``` ## Also fix - No double prefix: `pkg_pkg_*` should be `pkg_*` - Detect package type from `<extension type="package">` in pkg_*.xml ## Test Trigger RC pre-release on MokoJoomGallery after fix and verify non-zero ZIP with correct structure.
Author
Owner

Branch created: feature/92-bug-critical-package-build-php-produces-

git fetch origin
git checkout feature/92-bug-critical-package-build-php-produces-
Branch created: [`feature/92-bug-critical-package-build-php-produces-`](https://git.mokoconsulting.tech/MokoConsulting/moko-platform/src/branch/feature/92-bug-critical-package-build-php-produces-) ```bash git fetch origin git checkout feature/92-bug-critical-package-build-php-produces- ```
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#92