@anonymous-piwik-user opened this Issue on January 8th 2009

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!


Keywords: Db

@zawadzinski commented on January 8th 2009 Contributor
@zawadzinski commented on January 8th 2009 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-piwik-user commented on January 8th 2009

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 commented on January 13th 2009 Contributor

Fixed in [859].

This Issue was closed on August 13th 2009
Powered by GitHub Issue Mirror