[BUG]: Unknown column 'add_jcb_powers_path' in 'field list' #1106

Closed
opened 2024-04-09 19:40:34 +00:00 by jjs · 8 comments

What Happened?

Only updated from jcb 3.2.1-alpha1 to jcb 3.2.1-alpha3

Using the same component, nothing changed, only trying to re-compile

Steps to reproduce the Bug

update jcb to 3.2.1-alpha3

Which Joomla version are you compiling in?

3

Which PHP version are you compiling in?

8.0

Which Joomla versions are you targeting?

3

Which PHP version are you targeting?

8.0

Which Web server is JCB running on?

Apache

Which Relational Database is JCB running on?

Mariadb

Which OS is JCB running on?

Linux ubuntu

Which JCB version are you using?

3.2.1-alpha3

Which Joomla version is JCB installed on?

Joomla 3

Where in JCB did this issue occur?

Compilation of a component, Compiler(admin_view)

On which browsers did you encounter the issue?

Firefox

Additional Comments

No response

### What Happened? Only updated from jcb 3.2.1-alpha1 to jcb 3.2.1-alpha3 Using the same component, nothing changed, only trying to re-compile ### Steps to reproduce the Bug update jcb to 3.2.1-alpha3 ### Which Joomla version are you compiling in? 3 ### Which PHP version are you compiling in? 8.0 ### Which Joomla versions are you targeting? 3 ### Which PHP version are you targeting? 8.0 ### Which Web server is JCB running on? Apache ### Which Relational Database is JCB running on? Mariadb ### Which OS is JCB running on? Linux ubuntu ### Which JCB version are you using? 3.2.1-alpha3 ### Which Joomla version is JCB installed on? Joomla 3 ### Where in JCB did this issue occur? Compilation of a component, Compiler(admin_view) ### On which browsers did you encounter the issue? Firefox ### Additional Comments _No response_
jjs added the
Bug
label 2024-04-09 19:40:34 +00:00
Owner

Please give us more information, screenshots and details. We did not experience the same, and are not able to reproduce this just yet.

Please give us more information, screenshots and details. We did not experience the same, and are not able to reproduce this just yet.
Author

I have the same issue on Joomla 5 using 5.0.0-beta2. Also under Linux Ubuntu but for this with php8.2
I just updated to the latest version.
And here only Hello world is there as a component, as I'm now mainly trying to create in joomla 3.

this is some error text related to vdm:
VDM\Joomla\Utilities\GetHelper::var() JROOT/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Config.php:707
7 VDM\Joomla\Componentbuilder\Compiler\Config->getJcbpowerspath() JROOT/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/BaseConfig.php:91
8 VDM\Joomla\Abstraction\BaseConfig->get() JROOT/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Get.php:1077
9 VDM\Joomla\Componentbuilder\Compiler\Helper\Get->__construct() JROOT/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Structure.php:419
10 VDM\Joomla\Componentbuilder\Compiler\Helper\Structure->__construct() JROOT/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Interpretation.php:289
11 VDM\Joomla\Componentbuilder\Compiler\Helper\Interpretation->__construct() JROOT/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Infusion.php:64
12 VDM\Joomla\Componentbuilder\Compiler\Helper\Infusion->__construct() JROOT/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Compiler.php:84
13 VDM\Joomla\Componentbuilder\Compiler\Helper\Compiler->__construct() JROOT/administrator/components/com_componentbuilder/src/Model/CompilerModel.php:292
14 VDM\Component\Componentbuilder\Administrator\Model\CompilerModel->builder() JROOT/administrator/components/com_componentbuilder/src/Controller/CompilerController.php:116
15 VDM\Component\Componentbuilder\Administrator\Controller\CompilerController->compiler() JROOT/libraries/src/MVC/Controller/BaseController.php:730

Then some from the apache error log:
[Wed Apr 10 20:45:13.203473 2024] [proxy_fcgi:error] [pid 1699] [client 127.0.0.1:44984] AH01071: Got error 'PHP message: PHP Deprecated: Optional parameter $replaceValue declared before required parameter $componentId is implicitly treated as a required parameter in /var/www/site83.test/joomla5componentdev/administrator/components/com_componentbuilder/src/Model/AjaxModel.php on line 3726; PHP message: PHP Deprecated: Optional parameter $replaceValue declared before required parameter $regexSearch is implicitly treated as a required parameter in /var/www/site83.test/joomla5componentdev/administrator/components/com_componentbuilder/src/Model/AjaxModel.php on line 3772; PHP message: PHP Deprecated: Optional parameter $replaceValue declared before required parameter $regexSearch is implicitly treated as a required parameter in /var/www/site83.test/joomla5componentdev/administrator/components/com_componentbuilder/src/Model/AjaxModel.php on line 3819', referer: http://site83.test/joomla5componentdev/administrator/index.php?option=com_componentbuilder&view=compiler
[Wed Apr 10 20:45:17.243950 2024] [proxy_fcgi:error] [pid 1699] [client 127.0.0.1:44984] AH01071: Got error 'PHP message: PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/site83.test/joomla5componentdev/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Interpretation.php on line 6402; PHP message: PHP Deprecated: Implicit conversion from float 3.1 to int loses precision in /var/www/site83.test/joomla5componentdev/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Get.php on line 50; PHP message: PHP Deprecated: Implicit conversion from float 3.1 to int loses precision in /var/www/site83.test/joomla5componentdev/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Get.php on line 50; PHP message: PHP Deprecated: Implicit conversion from float 3.1 to int loses precision in /var/www/site83.test/joomla5componentdev/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Get.php on line 50; PHP message: PHP Deprecated: Implicit conversion from float 3.1 to int loses precision in /var/www/site83.test/joomla5componentdev/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Get.php on line 50; PHP message: PHP Deprecated: Implicit conversion from float 3.1 to int loses precision in /var/www/site83.test/joomla5componentdev/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Get.php on line 50; PHP message: PHP Deprecated: Implicit conversion from float 3.1 to int loses precision in /var/www/site83.test/joomla5componentdev/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Get.php on line 50', referer: http://site83.test/joomla5componentdev/administrator/index.php?option=com_componentbuilder&view=compiler

and a screenshot of the error, which is equal to the error with jcb 3.2.1-Alpha1 on joomla 3 with php 8.0.30

Does this help?

I have the same issue on Joomla 5 using 5.0.0-beta2. Also under Linux Ubuntu but for this with php8.2 I just updated to the latest version. And here only Hello world is there as a component, as I'm now mainly trying to create in joomla 3. this is some error text related to vdm: VDM\Joomla\Utilities\GetHelper::var() JROOT/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Config.php:707 7 VDM\Joomla\Componentbuilder\Compiler\Config->getJcbpowerspath() JROOT/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/BaseConfig.php:91 8 VDM\Joomla\Abstraction\BaseConfig->get() JROOT/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Get.php:1077 9 VDM\Joomla\Componentbuilder\Compiler\Helper\Get->__construct() JROOT/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Structure.php:419 10 VDM\Joomla\Componentbuilder\Compiler\Helper\Structure->__construct() JROOT/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Interpretation.php:289 11 VDM\Joomla\Componentbuilder\Compiler\Helper\Interpretation->__construct() JROOT/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Infusion.php:64 12 VDM\Joomla\Componentbuilder\Compiler\Helper\Infusion->__construct() JROOT/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Compiler.php:84 13 VDM\Joomla\Componentbuilder\Compiler\Helper\Compiler->__construct() JROOT/administrator/components/com_componentbuilder/src/Model/CompilerModel.php:292 14 VDM\Component\Componentbuilder\Administrator\Model\CompilerModel->builder() JROOT/administrator/components/com_componentbuilder/src/Controller/CompilerController.php:116 15 VDM\Component\Componentbuilder\Administrator\Controller\CompilerController->compiler() JROOT/libraries/src/MVC/Controller/BaseController.php:730 Then some from the apache error log: [Wed Apr 10 20:45:13.203473 2024] [proxy_fcgi:error] [pid 1699] [client 127.0.0.1:44984] AH01071: Got error 'PHP message: PHP Deprecated: Optional parameter $replaceValue declared before required parameter $componentId is implicitly treated as a required parameter in /var/www/site83.test/joomla5componentdev/administrator/components/com_componentbuilder/src/Model/AjaxModel.php on line 3726; PHP message: PHP Deprecated: Optional parameter $replaceValue declared before required parameter $regexSearch is implicitly treated as a required parameter in /var/www/site83.test/joomla5componentdev/administrator/components/com_componentbuilder/src/Model/AjaxModel.php on line 3772; PHP message: PHP Deprecated: Optional parameter $replaceValue declared before required parameter $regexSearch is implicitly treated as a required parameter in /var/www/site83.test/joomla5componentdev/administrator/components/com_componentbuilder/src/Model/AjaxModel.php on line 3819', referer: http://site83.test/joomla5componentdev/administrator/index.php?option=com_componentbuilder&view=compiler [Wed Apr 10 20:45:17.243950 2024] [proxy_fcgi:error] [pid 1699] [client 127.0.0.1:44984] AH01071: Got error 'PHP message: PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/site83.test/joomla5componentdev/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Interpretation.php on line 6402; PHP message: PHP Deprecated: Implicit conversion from float 3.1 to int loses precision in /var/www/site83.test/joomla5componentdev/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Get.php on line 50; PHP message: PHP Deprecated: Implicit conversion from float 3.1 to int loses precision in /var/www/site83.test/joomla5componentdev/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Get.php on line 50; PHP message: PHP Deprecated: Implicit conversion from float 3.1 to int loses precision in /var/www/site83.test/joomla5componentdev/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Get.php on line 50; PHP message: PHP Deprecated: Implicit conversion from float 3.1 to int loses precision in /var/www/site83.test/joomla5componentdev/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Get.php on line 50; PHP message: PHP Deprecated: Implicit conversion from float 3.1 to int loses precision in /var/www/site83.test/joomla5componentdev/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Get.php on line 50; PHP message: PHP Deprecated: Implicit conversion from float 3.1 to int loses precision in /var/www/site83.test/joomla5componentdev/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Get.php on line 50', referer: http://site83.test/joomla5componentdev/administrator/index.php?option=com_componentbuilder&view=compiler and a screenshot of the error, which is equal to the error with jcb 3.2.1-Alpha1 on joomla 3 with php 8.0.30 Does this help?

I've logged the query that it tries to run to compile the demo component since i have the exact same issue:

SELECT add_jcb_powers_path
FROM #__componentbuilder_joomla_component
WHERE id = 25

This is where it fails.

the column is not there after updating. So it seems it's not in the update mysql files for JCB.

I've logged the query that it tries to run to compile the demo component since i have the exact same issue: SELECT `add_jcb_powers_path` FROM `#__componentbuilder_joomla_component` WHERE `id` = 25 This is where it fails. the column is not there after updating. So it seems it's not in the update mysql files for JCB.

Running the sql manually from the update file 5.0.0-alpha.sql fixed it:

ALTER TABLE #__componentbuilder_joomla_component ADD add_jcb_powers_path TINYINT(1) NOT NULL DEFAULT 0 AFTER add_javascript;

ALTER TABLE #__componentbuilder_joomla_component ADD jcb_powers_path VARCHAR(255) NOT NULL DEFAULT '' AFTER javascript;

Running the sql manually from the update file 5.0.0-alpha.sql fixed it: ALTER TABLE `#__componentbuilder_joomla_component` ADD `add_jcb_powers_path` TINYINT(1) NOT NULL DEFAULT 0 AFTER `add_javascript`; ALTER TABLE `#__componentbuilder_joomla_component` ADD `jcb_powers_path` VARCHAR(255) NOT NULL DEFAULT '' AFTER `javascript`;
Owner

Yes the update of the database was skipped, it seems like our alpha, beta versions and the database updates they add are not always triggered...

I am looking into this and trying to see what we can do so that we will continue to have an automatic database update flow.

Yes the update of the database was skipped, it seems like our alpha, beta versions and the database updates they add are not always triggered... I am looking into this and trying to see what we can do so that we will continue to have an automatic database update flow.
Author

Running the sql manually from the update file 5.0.0-alpha.sql fixed it:

ALTER TABLE #__componentbuilder_joomla_component ADD add_jcb_powers_path TINYINT(1) NOT NULL DEFAULT 0 AFTER add_javascript;

ALTER TABLE #__componentbuilder_joomla_component ADD jcb_powers_path VARCHAR(255) NOT NULL DEFAULT '' AFTER javascript;

Thanks for finding it.
I tried similar to add the column to one the tables but that did not work.

> Running the sql manually from the update file 5.0.0-alpha.sql fixed it: > > ALTER TABLE `#__componentbuilder_joomla_component` ADD `add_jcb_powers_path` TINYINT(1) NOT NULL DEFAULT 0 AFTER `add_javascript`; > > ALTER TABLE `#__componentbuilder_joomla_component` ADD `jcb_powers_path` VARCHAR(255) NOT NULL DEFAULT '' AFTER `javascript`; > Thanks for finding it. I tried similar to add the column to one the tables but that did not work.
Owner

We have now added a fallback to make sure the JCB tables are always going to have all views, and columns going forward.

Your welcome to look at this new set of classes over here:

Called during the install J3 J4 J5 (post update event)

You can theoretically do that same in your projects, demonstration in tutorial coming soon ;)

PLEASE Test the latest JCB releases:

We have now added a fallback to make sure the JCB tables are always going to have all views, and columns going forward. Your welcome to look at this new set of classes over here: - Base or [Abstract Schema](https://git.vdm.dev/joomla/Component-Builder/src/branch/4.x/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Schema.php) - JCB [Schema](https://git.vdm.dev/joomla/Component-Builder/src/branch/4.x/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Table/Schema.php) Called during the install [J3](https://git.vdm.dev/joomla/Component-Builder/src/commit/5e980f5f95c475010d7f8b8493c114af84337fd6/script.php#L9807) [J4](https://git.vdm.dev/joomla/Component-Builder/src/commit/5e52db0d549d040916886d8c49c2c6f4c5972814/ComponentbuilderInstallerScript.php#L3208) [J5]() (post update event) You can theoretically do that same in your projects, demonstration in tutorial coming soon ;) PLEASE Test the latest JCB releases: - [version 3.2.1-beta1](https://git.vdm.dev/joomla/pkg-component-builder/archive/v3.2.1-beta1.zip) - [version 4.0.0-beta4](https://git.vdm.dev/joomla/pkg-component-builder/archive/v4.0.0-beta4.zip) - [version 5.0.0-beta4](https://git.vdm.dev/joomla/pkg-component-builder/archive/v5.0.0-beta4.zip)
Author

Zal ik doen.
Thanks very much!

Zal ik doen. Thanks very much!
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

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