Public Access
critical: plugin zips deploy files to group root instead of element subdirectory #300
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
When
release_package.phpbuilds plugin sub-extension zips for a Joomla package, some plugins' files get installed toplugins/{group}/(the group root) instead ofplugins/{group}/{element}/. This causes:services/provider.phpfrom one plugin overwrites the same path from anothersrc/,language/directories leak into the group rootImpact
Site-breaking — every update to MokoSuiteClient breaks the site with:
or
The file at
plugins/system/services/provider.phpkeeps getting overwritten by different plugins' provider files.Root Cause
The plugin zip files built by
release_package.phplikely have incorrect internal paths. Each plugin zip should contain files relative to the plugin root:Joomla then installs these to
plugins/{group}/{element}/. But if the element is empty or the zip structure is wrong, files go toplugins/{group}/directly.Affected Plugins
All system plugins in pkg_mokosuiteclient:
Workaround
Manually delete stale files after each update:
Fix Required
Verify that
release_package.phpcreates plugin zips with correct internal structure and that the package manifest's<file>elements have correctidattributes matching the plugin element names.Root cause was NOT in mokocli. The MokoSuiteClient install script had an ALTER TABLE in preflight that set element column to DEFAULT ''. This caused Joomla to install plugin files to plugins/{group}/ root instead of plugins/{group}/{element}/. Fixed by removing the ALTER TABLE from MokoSuiteClient's script.php. No mokocli changes needed.
Reopening — ALTER TABLE fix did not resolve the issue. Even after removing DEFAULT '' from the element column and cleaning all stale files, the next package update still installs plugin files to plugins/system/ root instead of plugins/system/{element}/.
The problem IS in release_package.php — the sub-extension zip files have incorrect internal structure. The plugin zips need their files at the root of the zip so Joomla installs them to the correct element subdirectory. Currently the zip structure or the package manifest element mapping is wrong.
This is site-breaking on every update.