@nbari opened this Issue on June 8th 2022

I am getting logs with:

Error in Matomo (tracker): Error query: SQLSTATE[22001]: String data, right truncated:

This is the query:

UPDATE matomo_log_visit SET profilable = ?, visit_last_action_time = ?, visitor_seconds_since_order = ?, visit_entry_idaction_url = ?, visit_exit_idaction_url = ?,  visit_total_actions = visit_total_actions + 1 ,  visit_total_interactions = visit_total_interactions + 1 , visit_total_time = ?, location_city = ?, location_country = ?, location_latitude = ?, location_longitude = ?, location_region = ?, last_idlink_va = ? WHERE idsite = ? AND idvisit = ? Parameters: array (   0 => 1,   1 => '2022-06-08 11:34:26',   2 => NULL,   3 => 12,   4 => 12,   5 => 2,   6 => 'Dubai',   7 => 'ae',   8 => '25.2633',   9 => '55.3087',   10 => 'AE-DU',   11 => '485553664',   12 => 1,   13 => '190492860',...

Using as a workaround:

ALTER table matomo_log_visit modify column location_region CHAR(6);

The incoming location_region is AE-DU but the default field is CHAR(3).

Any better alternatives?

@bx80 commented on June 8th 2022 Contributor

Hi @nbari, thanks for reporting this, it's very similar to issue #19319 and #15715 and could be included in any fix for those issues.

@sgiehl commented on June 9th 2022 Member

@nbari Which geolocation plugin and/or provider are you using?

@nbari commented on June 9th 2022

I am using DBIP/GeoIP 2(Php)

In the Download URL: https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City

@sgiehl commented on June 9th 2022 Member

Hm. In that case I would assume that maxmind, another time, might have broken records in their database. It's actually not the first time, that they return invalid data for some records. Region codes should normally be returned without the country code prefixed. e.g. only DU and not AE-DU. I'll prepare a small PR so we removed the prefixed country if that happens.

This Issue was closed on June 28th 2022
Powered by GitHub Issue Mirror