[BUG]: JCB 3.2.4 - Not adding new fiedls to table after adding to admin view #1218
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 an existing admin view.
Attempted to add 2 new fields to the view.
Fields are added to the view on the admin side, but the fields are not added to the related table.
No entry for the addition appears in the Component Update view either.
Changes saved on the admin view to these 2 fields are not saved to the db table (because there are no fields there for these items)
Steps to reproduce the Bug
Which Joomla version are you compiling in?
3.10.12
Which PHP version are you compiling in?
8.0.30
Which Joomla versions are you targeting?
3.10.12
Which PHP version are you targeting?
8.0.30
Which Web server is JCB running on?
Apache/2.4.56 (Debian) [via Octojoom]
Which Relational Database is JCB running on?
11.7.2-MariaDB-ubu2404
Which OS is JCB running on?
Ubuntu (Kubuntu) Desktop 24.10 - Running Joomla via Octojoom
Which JCB version are you using?
3.2.4
Where in JCB did this issue occur?
Compilation of a component
On which browsers did you encounter the issue?
Firefox
Additional Comments
(Original browser used is LibreWolf, but that wasn't an option in the form. Also tested in Firefox. But this shouldn't be effected by the browser)
Anybody else ever seen this before?
I seem to recall that I either saw this posted by someone else, or possibly happened to me, but I can't find anything mentioning it now.
BTW ... I've also tried to manually add the SQL needed in the component update area, but they just are removed whenever the component is complied.
Any tips or links to related/previous instances would be appreciated. (I'd go digging, but I have no idea where/how JCB builds those component updates entries.
Found a 'solution' to this issue (or more of a work-around):
I realized that in my original process list, step 1 wasn't completely accurate. I didn't create a 'new' field, but use the Save AS Copy option on a field that was similar and then made modifications (basically just changing the name, label and description - keeping the same custom Type).
I tried creating a new field completely new, but using the exact same values (new field; copy paste values from the previous field to the completely new field). Then added the new fields to the admin view.
This time the compile properly added the SQL update lines to the component updates, and the field was properly added to the table.
It appears that the problem is something with that Field entry within JCB not being recognized when it is a copy.
I'm going to leave this ticket open just so you see it, but as I understand JCB 3.x.x is no longer being developed, I'm hoping that this isn't a problem on JCB 4.x or 5.x when I HOPEFULLY get this project migrated within the next few weeks.
When you use
Save as Copy
to duplicate a field or admin view, immediately follow up withSave
orSave & Close
. JCB can only generate the required SQL update lines for Component Updates when each new field or admin view has at least one saved version. If you add fields to an admin view that has not saved versions yet, JCB will skip the SQL update lines for them.