-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4] JInstaller: :Install: Error SQL Field 'xxxxx' doesn't have a default value #30366
Comments
@garkell Could you provide a download link for your small sample component which failed to be installed? |
Hi Richard, but then provided me with a successful install message https://www.glennarkell.com.au/joomlaorg/components/com_gavoting-0.1.01.zip |
There are some problems with the component which I need to fix, just discovered since I've been able to install so don't be too concerned about the use of the component. Cheers. |
so i'm going to close this issue for now, feel free to open a new one when you think that you have discovered some bugs from core |
Hi Nicola, |
good question |
@garkell I'm just checking your install SQL and will report back what I find. You are inserting into the content types table, and that has been changed between J3 and J4. You may need to specify values for additional columns. I am just checking how we do it with our core extensions which we add in J4 on updates. Stay tuned. |
@garkell In your component's In the first statement are missing columns In the second statement only column Here the corrected SQL statements:
|
Ahhh brilliant, thank you very much Richard. I'll do a complete re-install of the latest nightly build and make those changes to my component for a clean test. Thank you again. Cheers. |
Thanks for helping us with testing J4. |
@richard67 Thank you for your encouragement. I was still getting a warning message " duplicate column name '' " so I removed the offending 2 inserts (as above) and the install was successful. Unfortunately the column name was blank so it didn't give me any clue what it was. I know this is closed but just in case this latest update helps in any way. Cheers. |
@garkell Well these 2 insert statements have a fixed column list for the insert, but for the subquery a "SELECT *" is used, that's the problem, I think. You have to specifiy the columns in the subquery to be safe. But that's an issue of the extension, not of the Joomla core. So it's fine that this issue here remains closed. |
Ahhh thank you for the explanation, this just shows up my limited understanding. Thank you again for taking the time. |
Steps to reproduce the issue
New install of nightly build.
Try to install 3rd party component (my own small sample)
Expected result
Complete install or an error message relating to 3rd party component.
Actual result
JInstaller: :Install: Error SQL Field 'rules' doesn't have a default value
JInstaller: :Install: Error SQL Field 'field_mappings' doesn't have a default value
System information (as much as possible)
Nightly build of August 14, 2020
Apache/2.4.23 (Win64) PHP/7.2.13
5.7.14 - MySQL
Additional comments
JInstaller: :Install: Error SQL Field 'rules' doesn't have a default value
After altering all core tables that had the field referred to (these fields aren't part of 3rd party component) ie...
ALTER TABLE
jdqp0_assets
CHANGErules
rules
VARCHAR(5120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT 'JSON encoded access control.';the next message came up
JInstaller: :Install: Error SQL Field 'field_mappings' doesn't have a default value
The text was updated successfully, but these errors were encountered: