Skip to content
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

PDOException Field 'public_profile' doesn't have a default value #190

Open
lightbyte opened this issue Apr 4, 2018 · 8 comments
Open

PDOException Field 'public_profile' doesn't have a default value #190

lightbyte opened this issue Apr 4, 2018 · 8 comments
Assignees
Labels

Comments

@lightbyte
Copy link

lightbyte commented Apr 4, 2018

In the start up fase, after submit the information for the admin user I got this error:

Error
An Internal Error Has Occurred.

And in the logs I have this:

Error: [PDOException] SQLSTATE[HY000]: General error: 1364 Field 'public_profile' doesn't have a default value
Request URL: /source/installer/startup/account?locale=es_ES

And after set the default value to that field I got the same error for these other fields:

'public_email'
'token'
'last_login'

After set up default values or NULL in case of 'token' it worked.

@botchris
Copy link
Collaborator

botchris commented Apr 4, 2018

Seems your MySQL instance is using "strict" mode, try to disable it: https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html

@lightbyte
Copy link
Author

I've checked the sql mode following this instructions: https://stackoverflow.com/a/40889485/1331068 and it returns this:
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
By now, I'm developing locally and I can change that param but I'm not sure if I can change it in production server.
I will try to see if that avoids the error, but it should be solved, don't you think?

@lightbyte
Copy link
Author

I've removed STRICT_TRANS_TABLES from sql_mode, then removed database and source files. Then I've created the project with composer command composer create-project -s dev quickapps/website [website_name]. Now it didn't fail in user creation.
Should it work with strict mode on?

@botchris
Copy link
Collaborator

botchris commented Apr 5, 2018

QACMS at its time was designed with MySQL 5.6 in mind. Seems you are using MySQL 5.7 which includes a bunch of sql-mode directives by default. Prior to 5.7 there were no default directives at all.

So it is pretty unlikely I can "fix" this, as this affects QACMS's core and every existing plugin.

@lightbyte
Copy link
Author

I'm using vagrant server with mysql 5.6 and it was configured as it was by default.

@botchris
Copy link
Collaborator

botchris commented Apr 5, 2018

@lightbyte
Copy link
Author

Then should I set sql_mode = NO_ENGINE_SUBSTITUTION only for QACMS to work properly?

@botchris
Copy link
Collaborator

botchris commented Apr 5, 2018

Yes, sql_mode = NO_ENGINE_SUBSTITUTION.

However I'll try to identify all those columns and fix them all at once.

@botchris botchris self-assigned this Apr 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants