While investigating issue #1271, I identified a flaw in the path normalization logic in Utilities/Normalize.php that causes certain valid files linked to a component to be excluded from the packaging process.
This function is responsible for resolving file paths so that linked resources can be collected and pushed into the package repository by the packaging engine.
Observed behavior
The current implementation does not recognize all valid file locations associated with a component. As a result, some legitimate files are never validated and are therefore not included in the generated package.
The issue presents itself in the following ways:
Component compiler files are missing
Files (eg. License files) located under: /components/com_componentbuilder/compiler are directly linked to the component but are not picked up by the path builder. These files never enter the packaging pipeline and are omitted from the final package.
Image Files without /images in their stored path are ignored (eg. #1271)
The current implementation assumes that all file paths resolve relative to JPATH_SITE. As a result, any linked files that does not have /images in their path stored in the system fails to resolve correctly.
Impact
Because of this behavior, packages created with the packaging engine may be incomplete. This can result in:
Missing required files in deployments
Broken component functionality
Incomplete package contents
Absent license files in published distributions
Steps to reproduce the Bug
The normalization logic fails to recognize multiple valid file paths, causing required resources and license files to be excluded from generated packages. This results in incomplete and unreliable package builds and should be corrected to ensure all component-linked files are properly included.
Which Joomla version are you compiling in?
v5.4.1
Which PHP version are you compiling in?
v8.3
Which Joomla versions are you targeting?
v5.4.1
Which PHP version are you targeting?
v8.3
Which Web server is JCB running on?
Apache Latest
Which Relational Database is JCB running on?
MariaDB Latest
Which OS is JCB running on?
Ubuntu 24.04 LTS
Which JCB version are you using?
v5.1.4-alpha6
Where in JCB did this issue occur?
Other
On which browsers did you encounter the issue?
Firefox
Additional Comments
We are busy refactoring this class function and will release a fix in the next JCB Release.
### What Happened?
While investigating issue **#1271**, I identified a flaw in the path normalization logic in [Utilities/Normalize.php](https://git.vdm.dev/joomla/Component-Builder/src/branch/5.x/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Utilities/Normalize.php) that causes certain valid files linked to a component to be excluded from the packaging process.
The affected logic is located in:
[Utilities/Normalize.php-> function build](https://git.vdm.dev/joomla/Component-Builder/src/commit/6ac19a631996e63bc1b01cdf4e1f6cb46d41910c/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Utilities/Normalize.php#L153)
This function is responsible for resolving file paths so that linked resources can be collected and pushed into the package repository by the packaging engine.
### Observed behavior
The current implementation does not recognize all valid file locations associated with a component. As a result, some legitimate files are never validated and are therefore not included in the generated package.
The issue presents itself in the following ways:
- Component compiler files are missing
Files (eg. License files) located under: `/components/com_componentbuilder/compiler` are directly linked to the component but are not picked up by the path builder. These files never enter the packaging pipeline and are omitted from the final package.
- Image Files without `/images` in their stored path are ignored (eg. **#1271**)
The current implementation assumes that all file paths resolve relative to `JPATH_SITE`. As a result, any linked files that does not have `/images` in their path stored in the system fails to resolve correctly.
### Impact
Because of this behavior, packages created with the packaging engine may be incomplete. This can result in:
- Missing required files in deployments
- Broken component functionality
- Incomplete package contents
- Absent license files in published distributions
### Steps to reproduce the Bug
The normalization logic fails to recognize multiple valid file paths, causing required resources and license files to be excluded from generated packages. This results in incomplete and unreliable package builds and should be corrected to ensure all component-linked files are properly included.
### Which Joomla version are you compiling in?
v5.4.1
### Which PHP version are you compiling in?
v8.3
### Which Joomla versions are you targeting?
v5.4.1
### Which PHP version are you targeting?
v8.3
### Which Web server is JCB running on?
Apache Latest
### Which Relational Database is JCB running on?
MariaDB Latest
### Which OS is JCB running on?
Ubuntu 24.04 LTS
### Which JCB version are you using?
v5.1.4-alpha6
### Where in JCB did this issue occur?
Other
### On which browsers did you encounter the issue?
Firefox
### Additional Comments
We are busy refactoring this class function and will release a fix in the next **JCB Release**.
Lemuel
added the Bug label 2025-12-04 10:42:31 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What Happened?
While investigating issue #1271, I identified a flaw in the path normalization logic in Utilities/Normalize.php that causes certain valid files linked to a component to be excluded from the packaging process.
The affected logic is located in:
Utilities/Normalize.php-> function build
This function is responsible for resolving file paths so that linked resources can be collected and pushed into the package repository by the packaging engine.
Observed behavior
The current implementation does not recognize all valid file locations associated with a component. As a result, some legitimate files are never validated and are therefore not included in the generated package.
The issue presents itself in the following ways:
Component compiler files are missing
Files (eg. License files) located under:
/components/com_componentbuilder/compilerare directly linked to the component but are not picked up by the path builder. These files never enter the packaging pipeline and are omitted from the final package.Image Files without
/imagesin their stored path are ignored (eg. #1271)The current implementation assumes that all file paths resolve relative to
JPATH_SITE. As a result, any linked files that does not have/imagesin their path stored in the system fails to resolve correctly.Impact
Because of this behavior, packages created with the packaging engine may be incomplete. This can result in:
Steps to reproduce the Bug
The normalization logic fails to recognize multiple valid file paths, causing required resources and license files to be excluded from generated packages. This results in incomplete and unreliable package builds and should be corrected to ensure all component-linked files are properly included.
Which Joomla version are you compiling in?
v5.4.1
Which PHP version are you compiling in?
v8.3
Which Joomla versions are you targeting?
v5.4.1
Which PHP version are you targeting?
v8.3
Which Web server is JCB running on?
Apache Latest
Which Relational Database is JCB running on?
MariaDB Latest
Which OS is JCB running on?
Ubuntu 24.04 LTS
Which JCB version are you using?
v5.1.4-alpha6
Where in JCB did this issue occur?
Other
On which browsers did you encounter the issue?
Firefox
Additional Comments
We are busy refactoring this class function and will release a fix in the next JCB Release.