Update SQL not generated when adding a new field #1212

Open
opened 2025-03-15 22:04:54 +00:00 by znorm87 · 3 comments

Steps to reproduce the issue

Create new fields
Add new fields to Admin View
Compile Component

Expected result

SQL update would be generated with the content for the new field.
The component would increment to a new version.
Code is generated for the new field

Actual result

The code is generated for the field on the admin view. There isn't a spot for the data in the database. I am unable to save/retrieve data for the field.

System information (as much as possible)

  • OS Name & Version: Server is Linux hou-2 5.3.18-150300.59.98-default, I use MacOS 15.3.1
  • MySql Version: 5.7.23-23
  • Apache Version: unsure
  • PHP Version: 8.3.6
  • Joomla Version: Joomla! 4.4.12 Stable [ Pamoja ] 11-March-2025 16:00 GMT
  • JCB Version: 4.1.0
  • Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:131.0) Gecko/20100101 Firefox/131.0

Additional comments

I started having this challenge while using the beta versions but assumed that since I'm such a novice developer, I had done something wrong when I upgraded my site from J3 to J4. I hoped this would resolve once I was on a stable version of JCB.

These are the plugins I have for compiling:
Screenshot 2025-03-15 at 16.58.35.png

### Steps to reproduce the issue Create new fields Add new fields to Admin View Compile Component ### Expected result SQL update would be generated with the content for the new field. The component would increment to a new version. Code is generated for the new field ### Actual result The code is generated for the field on the admin view. There isn't a spot for the data in the database. I am unable to save/retrieve data for the field. ### System information (as much as possible) - OS Name & Version: Server is Linux hou-2 5.3.18-150300.59.98-default, I use MacOS 15.3.1 - MySql Version: 5.7.23-23 - Apache Version: unsure - PHP Version: 8.3.6 - Joomla Version: Joomla! 4.4.12 Stable [ Pamoja ] 11-March-2025 16:00 GMT - JCB Version: 4.1.0 - Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:131.0) Gecko/20100101 Firefox/131.0 ### Additional comments I started having this challenge while using the beta versions but assumed that since I'm such a novice developer, I had done something wrong when I upgraded my site from J3 to J4. I hoped this would resolve once I was on a stable version of JCB. These are the plugins I have for compiling: ![Screenshot 2025-03-15 at 16.58.35.png](/attachments/536018f2-322d-48f9-9c92-b8edf86e1be5)
Owner

The latest v5.1.1-alpha4 has this issue resolve, if you like to test it.

The latest [v5.1.1-alpha4](https://git.vdm.dev/joomla/pkg-component-builder/archive/v5.1.1-alpha4.zip) has this issue resolve, if you like to test it.
Author

After upgrading to 5.1.1-alpha4, I navigate to an Admin View to add a field:
I get:
An error has occurred.
0 Class "Joomla\CMS\Form\Field\ModalSelectField" not found
Call stack

Function Location

1 () JROOT/administrator/components/com_componentbuilder/src/Field/ModalSelectField.php:29
2 include() JROOT/libraries/vendor/composer/ClassLoader.php:571
3 Composer\Autoload\includeFile() JROOT/libraries/vendor/composer/ClassLoader.php:428
4 Composer\Autoload\ClassLoader->loadClass() JROOT/libraries/src/Autoload/ClassLoader.php:59
5 Joomla\CMS\Autoload\ClassLoader->loadClass()
6 class_exists() JROOT/libraries/src/Form/FormHelper.php:224
7 Joomla\CMS\Form\FormHelper::loadClass() JROOT/libraries/src/Form/FormHelper.php:136
8 Joomla\CMS\Form\FormHelper::loadType() JROOT/libraries/src/Form/FormHelper.php:78
9 Joomla\CMS\Form\FormHelper::loadFieldType() JROOT/libraries/src/Form/Form.php:1452
10 Joomla\CMS\Form\Form->loadField() JROOT/libraries/src/Form/Form.php:435
11 Joomla\CMS\Form\Form->getGroup() JROOT/administrator/components/com_componentbuilder/layouts/sectionjcbjfive.php:55
12 include() JROOT/libraries/src/Layout/FileLayout.php:128
13 Joomla\CMS\Layout\FileLayout->render() JROOT/libraries/src/Layout/LayoutHelper.php:76
14 Joomla\CMS\Layout\LayoutHelper::render() JROOT/administrator/components/com_componentbuilder/layouts/repeatablejcbjfive.php:73
15 include() JROOT/libraries/src/Layout/FileLayout.php:128
16 Joomla\CMS\Layout\FileLayout->render() JROOT/libraries/src/Form/Field/SubformField.php:274
17 Joomla\CMS\Form\Field\SubformField->getInput() JROOT/libraries/src/Form/FormField.php:1042
18 Joomla\CMS\Form\FormField->renderField() JROOT/libraries/src/Form/Form.php:536
19 Joomla\CMS\Form\Form->renderField() JROOT/administrator/components/com_componentbuilder/layouts/admin_fields/fields_fullwidth.php:42
20 include() JROOT/libraries/src/Layout/FileLayout.php:128
21 Joomla\CMS\Layout\FileLayout->render() JROOT/libraries/src/Layout/LayoutHelper.php:76
22 Joomla\CMS\Layout\LayoutHelper::render() JROOT/administrator/components/com_componentbuilder/tmpl/admin_fields/default.php:59
23 include() JROOT/libraries/src/MVC/View/HtmlView.php:415
24 Joomla\CMS\MVC\View\HtmlView->loadTemplate() JROOT/libraries/src/MVC/View/HtmlView.php:203
25 Joomla\CMS\MVC\View\HtmlView->display() JROOT/administrator/components/com_componentbuilder/src/View/Admin_fields/HtmlView.php:206
26 VDM\Component\Componentbuilder\Administrator\View\Admin_fields\HtmlView->display() JROOT/libraries/src/MVC/Controller/BaseController.php:660
27 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/administrator/components/com_componentbuilder/src/Controller/DisplayController.php:43
28 VDM\Component\Componentbuilder\Administrator\Controller\DisplayController->display() JROOT/libraries/src/MVC/Controller/BaseController.php:693
29 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/libraries/src/Dispatcher/ComponentDispatcher.php:143
30 Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:361
31 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:143
32 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:186
33 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:293
34 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/includes/app.php:61
35 require_once() JROOT/administrator/index.php:32

After upgrading to 5.1.1-alpha4, I navigate to an Admin View to add a field: I get: An error has occurred. 0 Class "Joomla\CMS\Form\Field\ModalSelectField" not found Call stack # Function Location 1 () JROOT/administrator/components/com_componentbuilder/src/Field/ModalSelectField.php:29 2 include() JROOT/libraries/vendor/composer/ClassLoader.php:571 3 Composer\Autoload\includeFile() JROOT/libraries/vendor/composer/ClassLoader.php:428 4 Composer\Autoload\ClassLoader->loadClass() JROOT/libraries/src/Autoload/ClassLoader.php:59 5 Joomla\CMS\Autoload\ClassLoader->loadClass() 6 class_exists() JROOT/libraries/src/Form/FormHelper.php:224 7 Joomla\CMS\Form\FormHelper::loadClass() JROOT/libraries/src/Form/FormHelper.php:136 8 Joomla\CMS\Form\FormHelper::loadType() JROOT/libraries/src/Form/FormHelper.php:78 9 Joomla\CMS\Form\FormHelper::loadFieldType() JROOT/libraries/src/Form/Form.php:1452 10 Joomla\CMS\Form\Form->loadField() JROOT/libraries/src/Form/Form.php:435 11 Joomla\CMS\Form\Form->getGroup() JROOT/administrator/components/com_componentbuilder/layouts/sectionjcbjfive.php:55 12 include() JROOT/libraries/src/Layout/FileLayout.php:128 13 Joomla\CMS\Layout\FileLayout->render() JROOT/libraries/src/Layout/LayoutHelper.php:76 14 Joomla\CMS\Layout\LayoutHelper::render() JROOT/administrator/components/com_componentbuilder/layouts/repeatablejcbjfive.php:73 15 include() JROOT/libraries/src/Layout/FileLayout.php:128 16 Joomla\CMS\Layout\FileLayout->render() JROOT/libraries/src/Form/Field/SubformField.php:274 17 Joomla\CMS\Form\Field\SubformField->getInput() JROOT/libraries/src/Form/FormField.php:1042 18 Joomla\CMS\Form\FormField->renderField() JROOT/libraries/src/Form/Form.php:536 19 Joomla\CMS\Form\Form->renderField() JROOT/administrator/components/com_componentbuilder/layouts/admin_fields/fields_fullwidth.php:42 20 include() JROOT/libraries/src/Layout/FileLayout.php:128 21 Joomla\CMS\Layout\FileLayout->render() JROOT/libraries/src/Layout/LayoutHelper.php:76 22 Joomla\CMS\Layout\LayoutHelper::render() JROOT/administrator/components/com_componentbuilder/tmpl/admin_fields/default.php:59 23 include() JROOT/libraries/src/MVC/View/HtmlView.php:415 24 Joomla\CMS\MVC\View\HtmlView->loadTemplate() JROOT/libraries/src/MVC/View/HtmlView.php:203 25 Joomla\CMS\MVC\View\HtmlView->display() JROOT/administrator/components/com_componentbuilder/src/View/Admin_fields/HtmlView.php:206 26 VDM\Component\Componentbuilder\Administrator\View\Admin_fields\HtmlView->display() JROOT/libraries/src/MVC/Controller/BaseController.php:660 27 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/administrator/components/com_componentbuilder/src/Controller/DisplayController.php:43 28 VDM\Component\Componentbuilder\Administrator\Controller\DisplayController->display() JROOT/libraries/src/MVC/Controller/BaseController.php:693 29 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/libraries/src/Dispatcher/ComponentDispatcher.php:143 30 Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:361 31 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:143 32 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:186 33 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:293 34 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/includes/app.php:61 35 require_once() JROOT/administrator/index.php:32
Owner

5.1.1-alpha4 is for Joomla 5... not Joomla 4

5.1.1-alpha4 is for Joomla 5... not Joomla 4
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

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