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

length field location_browser_lang in too small for international versions of FireFox 3.0.5 #490

Closed
anonymous-matomo-user opened this issue Jan 8, 2009 · 4 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Milestone

Comments

@anonymous-matomo-user
Copy link

Hi there,

when testing Piwik on my local webserver this morning no visits were recorded. After some investigation I found out that things didn’t work because I was testing with my Dutch FireFox 3.0.5 which sends the string “nl-NL,nl;q=0.7,chrome://global/locale/intl.properties;q=0.3” which is ofcourse too long to fit in the varchar(20) location_browser_lang field in the log_visit table. This led to an uncaught exception in core\Tracker\Db.php so the FireFox visit wasn’t inserted.

When I altered the length of the field to varchar(100) everything worked as expected! I assume this happens in all international versions of FireFox 3.05 and we want their visists to be recorded, don’t we? Because FireFox rocks just like
Piwik really rocks! We all love it here!

Thanks,

Arno
Keywords: Db

@zawadzinski
Copy link
Contributor

Attachment:
[browser_language.patch](http://issues.piwik.org/attachments/490/browser_language.patch)

@zawadzinski
Copy link
Contributor

i think that we should get only first 20 characters, which certainly defines language the it does not waste space in the db. i put a small patch in the attachment

@anonymous-matomo-user
Copy link
Author

Wow, that’s a quick reply! Just after sending the ticket I realized the problem only occurs when MySQL is in SQL Strict mode. I installed Piwik on one of our live sites and there it worked without altering the field because the string was simply truncated by the MySQL Server…

Of course your solution to only take the first 20 characters is far better than my quick-and-dirty solution of altering the field length!

Thanks for the quick reply and the patch!

@robocoder
Copy link
Contributor

Fixed in 859.

This issue was closed.
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. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

3 participants