Skip to content

Attempt to handle incorrectly prefixed region codes #19323

@nbari

Description

@nbari

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?

Metadata

Metadata

Assignees

Labels

BugFor errors / faults / flaws / inconsistencies etc.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions