[BUG]: JCB 3.2.4 - Not adding new fiedls to table after adding to admin view #1218

Closed
opened 2025-04-26 17:30:45 +00:00 by cpaschen · 3 comments

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

  1. Create new field (type: custom)
  2. Open Admin View
  3. Click Admin Fields
  4. Add the new fields to the view & Save
  5. Recompile and Install
  6. Open Admin view
  7. Change values for fields
  8. Save Record
  9. Re-open Record - No values saved
  10. View table via phpMyAdmin - no fields in the table structure for the new fields that were added

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)

### 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 1. Create new field (type: custom) 2. Open Admin View 3. Click Admin Fields 4. Add the new fields to the view & Save 5. Recompile and Install 6. Open Admin view 7. Change values for fields 8. Save Record 9. Re-open Record - No values saved 10. View table via phpMyAdmin - no fields in the table structure for the new fields that were added ### 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)
cpaschen added the
Bug
label 2025-04-26 17:30:45 +00:00
Author

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.

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.
Author

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.

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.
Member

It appears that the problem is something with that Field entry within JCB not being recognized when it is a copy

When you use Save as Copy to duplicate a field or admin view, immediately follow up with Save or Save & 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.

> It appears that the problem is something with that Field entry within JCB not being recognized when it is a copy When you use `Save as Copy` to duplicate a field or admin view, immediately follow up with `Save` or `Save & 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.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: joomla/Component-Builder#1218
No description provided.