[BETA] Error during installation #1027

Closed
opened 2024-01-19 19:03:38 +00:00 by Safweb · 5 comments

I get this error when I try to install the new version (pkg-component-builder-v3.1.31.zip)

Warning
JInstaller: :Install: Error SQL Field 'addcontributors' doesn't have a default value
Extension installation stopped.
Package Install: There was an error installing an extension: joomla-beta__com-componentbuilder__master.zip
Error installing package

Steps to reproduce the issue

Expected result

Actual result

System information (as much as possible)

  • OS Name & Version:
  • MySql Version:
  • Apache Version:
  • PHP Version: 8.1.26
  • Joomla Version: 4.4.2
  • JCB Version:
  • Browser: Fierfox

Additional comments

I get this error when I try to install the new version (pkg-component-builder-v3.1.31.zip) Warning JInstaller: :Install: Error SQL Field 'addcontributors' doesn't have a default value Extension installation stopped. Package Install: There was an error installing an extension: joomla-beta__com-componentbuilder__master.zip Error installing package ### Steps to reproduce the issue ### Expected result ### Actual result ### System information (as much as possible) - OS Name & Version: - MySql Version: - Apache Version: - PHP Version: 8.1.26 - Joomla Version: 4.4.2 - JCB Version: - Browser: Fierfox ### Additional comments
Owner

JCB does not yet install on Joomla 4, it still installs on Joomla 3, but builds for Joomla 4 and 5 👍

JCB does not yet install on Joomla 4, it still installs on Joomla 3, but builds for Joomla 4 and 5 👍
Author

Great, thank you very much

Great, thank you very much
Member

Sorry to recycle this, but the issue occurs also on J5. It's not a Joomla issue, it's a MySQL/MariaDB issue. The error is an SQL error regarding the structure of the SQL statement missing a required value. I haven't been able to apply the prescribed fixes successfully, however.

https://mariadb.com/kb/en/sql-mode/

STRICT_TRANS_TABLES
bla-bla-bla...Statements with invalid or missing data are aborted and rolled back

Unfortunately, even disabling STRICT_TRANS_TABLES doesn't resolve this issue. So I'm still fighting this.

So, it is a JCB issue in that a field is defined NOT NULL but does not have a defined default value, AND it is a MySQL/MariaDB issue in that the configuration to bypass the issue prescribed by the project doesn't seem to work (anymore?).

Sorry to recycle this, but the issue occurs also on J5. It's not a Joomla issue, it's a MySQL/MariaDB issue. The error is an SQL error regarding the structure of the SQL statement missing a required value. I haven't been able to apply the prescribed fixes successfully, however. https://mariadb.com/kb/en/sql-mode/ STRICT_TRANS_TABLES bla-bla-bla...Statements with invalid or missing data are aborted and rolled back Unfortunately, even disabling STRICT_TRANS_TABLES doesn't resolve this issue. So I'm still fighting this. So, it is a JCB issue in that a field is defined NOT NULL but does not have a defined default value, AND it is a MySQL/MariaDB issue in that the configuration to bypass the issue prescribed by the project doesn't seem to work (anymore?).
Member

Looking at install.mysql.utf8.sql, we can see that the addcontributors entry has the NOT NULL flag but no default value.

`add_update_server` TINYINT(1) NOT NULL DEFAULT 0,
`addcontributors` TEXT NOT NULL,
`addfootable` TINYINT(1) NOT NULL DEFAULT 0,

That's the first item in the SQL to have that issue, which is why the installation halts there. Only a few lines later there is "cwrowdin_account_api_key" which also has the issue. I didn't bother to count the number of times this occurs, because it's in the hundreds. The solution remains the same, either fix the issue with the SQL or force the database server to ignore it.

Fixing the SQL would be relatively simple, any item that doesn't have a default value could be null. Just remove the NOT NULL flag because it's going to be blank anyway. Another option would be to insert a default value depending on type. Text = "", *int = 0, etc...

Forcing the DB server to behave like versions past would be the easiest solution, but not all installations may have access to these types of DB configurations.

Looking at install.mysql.utf8.sql, we can see that the addcontributors entry has the NOT NULL flag but no default value. `add_update_server` TINYINT(1) NOT NULL DEFAULT 0, `addcontributors` TEXT NOT NULL, `addfootable` TINYINT(1) NOT NULL DEFAULT 0, That's the first item in the SQL to have that issue, which is why the installation halts there. Only a few lines later there is "cwrowdin_account_api_key" which also has the issue. I didn't bother to count the number of times this occurs, because it's in the hundreds. The solution remains the same, either fix the issue with the SQL or force the database server to ignore it. Fixing the SQL would be relatively simple, any item that doesn't have a default value could be null. Just remove the NOT NULL flag because it's going to be blank anyway. Another option would be to insert a default value depending on type. Text = "", *int = 0, etc... Forcing the DB server to behave like versions past would be the easiest solution, but not all installations may have access to these types of DB configurations.
Owner

Yes I am also working on this issue, as your right things changed and we need to update this in JCB.

But this issue was related to installing JCB on Joomla 4, and while it caused the same issue, JCB is not ready to install on Joomla 4. It can however build Joomla 4 and 5 components, and they should also allow dummy data as part of the install process.

So can we move this to a new issue?

Yes I am also working on this issue, as your right things changed and we need to update this in JCB. But this issue was related to installing JCB on Joomla 4, and while it caused the same issue, JCB is not ready to install on Joomla 4. It can however build Joomla 4 and 5 components, and they should also allow dummy data as part of the install process. So can we move this to a new issue?
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.

Dependencies

No dependencies set.

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