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

Field 'location_browser_lang' doesn't have a default value In query #6028

Closed
mattab opened this issue Aug 20, 2014 · 3 comments
Closed

Field 'location_browser_lang' doesn't have a default value In query #6028

mattab opened this issue Aug 20, 2014 · 3 comments
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. Critical Indicates the severity of an issue is very critical and the issue has a very high priority.
Milestone

Comments

@mattab
Copy link
Member

mattab commented Aug 20, 2014

Reported in forum:

2014/08/20 10:18:03 [error] 21463#0: *26 FastCGI sent in stderr: "PHP message: Error in Piwik (tracker): Error query: SQLSTATE[HY000]: General error: 1364 Field 'location_browser_lang' doesn't have a default value In query: INSERT INTO piwik_log_visit (idvisitor, config_id, location_ip, custom_var_k1, custom_var_v1, config_browser_version, config_os, config_cookie, config_director, config_browser_name, referer_url, visit_total_searches, visit_total_actions, [...]

Could we set a default value to columns in Tracker to prevent this and future similar errors?

(set as Critical since it can lead to data loss for users with a Mysql configured in this way)

@mattab mattab added this to the Piwik 2.6.0 milestone Aug 20, 2014
@mattab mattab added Major and removed Major labels Aug 20, 2014
@tsteur
Copy link
Member

tsteur commented Aug 20, 2014

As written in forum when having a look at the code the only way I can imagine this error happens is if UserSettings plugin is deactivated

tsteur added a commit that referenced this issue Aug 20, 2014
@quba
Copy link
Contributor

quba commented Aug 20, 2014

@tsteur: I think that you could reproduce it by setting sql_mode=STRICT_TRANS_TABLES in mysql config (it's default config starting from 5.6) and for example replaying data from logs (the value is empty in that case).

@tsteur
Copy link
Member

tsteur commented Aug 20, 2014

Users confirms it's fixed. It was this problem probably: 880ba14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Critical Indicates the severity of an issue is very critical and the issue has a very high priority.
Projects
None yet
Development

No branches or pull requests

3 participants