[BUG]: JCB Packager: Subform Field Dependencies Not Included in JCB Package Build #1239
Reference in New Issue
Block a user
No description provided.
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?
What Happened?
I have created a subform field within JCB. This subform field is linked to a component which I intend to distribute via a JCB package. The subform field contains two fields that are only used within the subform—they are not used anywhere else in the component.
These two dependent fields are explicitly defined within the subform and correctly referenced in the subform’s configuration. I’ve verified this through the code snippet showing the field dependencies, which clearly lists the two fields as dependencies of the subform.
Here is a screenshot of the fields in the package repository and as can be clearly seen, there is only the subform and not the other two linked fields:

Steps to reproduce the Bug
Create a Subform field with linked Fields that are not linked to any other area than the subform and push that Subform to a package repository.
Which Joomla version are you compiling in?
v5.3.2
Which PHP version are you compiling in?
v8.3
Which Joomla versions are you targeting?
v5.1.2-alpha1
Which PHP version are you targeting?
v8.3
Which Web server is JCB running on?
Latest
Which Relational Database is JCB running on?
11.4.3-MariaDB-ubu2404
Which OS is JCB running on?
Ubuntu 24.04 LTS
Which JCB version are you using?
v5.1.2-alpha1
Where in JCB did this issue occur?
Other
On which browsers did you encounter the issue?
Firefox
Additional Comments
When I
var_dump
the$dependencies
in the item function I get the following:Dependencies are found...
Also in the Remote/Set.php class, when I push the subform field and it already exists in the repo, but its dependencies does not, it triggers the updateItem and returns
NO CHANGE: Field item [Ingredients (Subform)] in repo (https://github.com/repo/JCB_package) is already in sync.
So after some more debugging on this, with help from @Llewellyn we identified the issue.
In the Dependency/Resolver.php at the function that identifies a subform dependency fields that was a small typo...
the above array should change to...
A simple issue like that...
We will release the fix with the next JCB alpha2.