Archives not working after 2.10 update


#1

INFO CoreConsole[2015-03-02 18:44:28] Error: Empty or invalid response ‘’ for website id 25, Time elapsed: 1.143s, skipping
INFO CoreConsole[2015-03-02 18:44:28] Error: Got invalid response from API request: -remove-. Response was 'a:2:{s:6:“result”;s:5:“error”;s:7:“message”;s:104:“SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘log_visit.location_browser_lang’ in ‘field list’”;}'
INFO CoreConsole[2015-03-02 18:44:28] Error: Empty or invalid response ‘’ for website id 44, Time elapsed: 1.140s, skipping
ERROR CoreConsole[2015-03-02 18:44:28] 28 total errors during this script execution, please investigate and try and fix these errors.
ERROR CoreConsole[2015-03-02 18:44:28] 28 total errors during this script execution, please investigate and try and fix these errors.

Any idea what’s going on here? How can I fix this?
Thanks in advance.


(Matthieu Napoli) #2

Please remove the domain and auth_token from your post for your own sake.

The error reported here is:

SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘log_visit.location_browser_lang’ in ‘field list’

Could it be that an update failed? Or maybe you updated Piwik manually but didn’t run the update command?


#3

If I manually run update via CLI, I get ‘Everything is already up to date’.

Besides archiving, everything else seems to be working fine, and the update process was painless for me.


(Matthieu Napoli) #4

I tried to do a quick search in the code on GitHub but couldn’t find where this column is created… It doesn’t seem to be a recent update, maybe somebody else has more info.


(Matthieu Aubry) #5

The column should have been created via the UserLanguage plugin piwik/Language.php at master · matomo-org/piwik · GitHub
can you try to disable / activate the UserLanguage plugins from the administration?


#6

I actually don’t even have that plugin installed. I’ll try installing it now and let you know what happens.


#7

Okay, this is most likely why I didn’t have it in the first place:

UserLanguage plugin is not compatible with Piwik 2.11.1.
If you’ve been using this plugin, maybe you can find a more recent version in the Marketplace. If not, you may want to uninstall it.


#8

I can’t re-enable this plugin and I’m stuck here. I checked via the Options panel and there are no bad or changed files in my installation.


(Matthieu Aubry) #9

That’s weird, can you check that all files were uploaded corretly? we just released 2.11.2 maybe try upgrade to that?


#10

Sure thing, I’m on Piwik 2.11.2 now.

I’m able to re-enable UserLanguage now, but I still get this error for all sites:
INFO CoreConsole[2015-03-04 17:59:19] Error: Empty or invalid response ‘’ for website id 33, Time elapsed: 0.887s, skipping
INFO CoreConsole[2015-03-04 17:59:19] Error: Got invalid response from API request: https://-domain-/index.php?module=API&method=API.get&idSite=46&period=day&date=last40&format=php&token_auth=removed&trigger=archivephp. Response was ‘a:2:{s:6:“result”;s:5:“error”;s:7:“message”;s:104:“SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘log_visit.location_browser_lang’ in ‘field list’”;}’


(Matthieu Aubry) #11

Hi there,

Ok that’s strange. if anyone else experience the issue please comment here. it should not occur so we would need to investigate how such bug can occur.

in meantime, fix your issue by running:


ALTER TABLE piwik_log_visit ADD COLUMN location_browser_lang VARCHAR(20) NOT NULL;


#12

Thanks! That worked great.


#13

Nope, happened to me as well. Using TYPO3 piwikintegration extension, but same error:

Error query: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘location_browser_lang’ in ‘field list’

In query: SELECT visit_last_action_time, visit_first_action_time, idvisitor, idvisit, user_id, visit_exit_idaction_url, visit_exit_idaction_name, visitor_returning, visitor_days_since_first, visitor_days_since_order, visitor_count_visits, visit_goal_buyer, location_country, location_region, location_city, location_latitude, location_longitude, referer_name, referer_keyword, referer_type, location_ip, location_browser_lang, visit_total_time, visit_total_searches, visit_total_actions , custom_var_k1, custom_var_v1, custom_var_k2, custom_var_v2, custom_var_k3, custom_var_v3, custom_var_k4, custom_var_v4, custom_var_k5, custom_var_v5 FROM user_piwikintegration_log_visit WHERE visit_last_action_time >= ? AND visit_last_action_time <= ? AND idsite = ? AND idvisitor = ? ORDER BY visit_last_action_time DESC LIMIT 1 Parameters: array ( 0 => ‘2015-06-09 09:30:04’, 1 => ‘2015-06-09 10:30:04’, 2 => 1, 3 => ‘˲% Ak’, )

When I checked the table user_piwikintegration_log_visit, I could see that there was already a column exactly as Matt described - varchar(20) and not null.

Without this functioning, I have no stats at all

Any input is appreciated!
-Scott.

UPDATE: I activated UserLanguage and the new error is:
Error in Piwik (tracker): Error query: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘config_device_brand’ in ‘field list’ In query: INSERT INTO user_piwikintegration_log_visit (idvisitor, config_id, location_ip, config_device_brand, config_device_model, config_device_type, config_os, config_browser_version, config_browser_name, location_browser_lang, config_browser_engine, config_os_version, visitor_localtime, visitor_days_since_last, location_provider, location_country, referer_url, referer_type, visit_total_time, visitor_days_since_first, visitor_days_since_order, visitor_returning, visit_last_action_time, visit_goal_converted, visit_first_action_time, visit_goal_buyer, visitor_count_visits, visit_entry_idaction_name, referer_keyword, referer_name, visit_total_searches, visit_total_actions, visit_entry_idaction_url, visit_exit_idaction_name, visit_exit_idaction_url, idsite) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) Parameters: array ( 0 => ‘˲% Ak’, 1 => ‘X▒▒G▒▒’, 2 => ‘E
’ . “\0” . ‘’ . “\0” . ‘’, 3 => ‘’, 4 => ‘’, 5 => 0, 6 => ‘WIN’, 7 => ‘43.0’, 8 => ‘CH’, 9 => ‘en-us’, 10 => ‘Blink’, 11 => ‘8.1’, 12 => ‘04:18:25’, 13 => ‘0’, 14 => ‘sk.ca’, 15 => ‘us’, 16 => ‘http://mydomain.ca/index.php?id=930’, 17 => 1, 18 => 0, 19 => ‘0’, 20 => 0, 21 => 0, 22 => ‘2015-06-09 10:18:59’, 23 => 0, 24 => ‘2015-06-09 10:18:59’, 25 => 0, 26 => 1, 27 => 15, 28 => ‘’, 29 => ‘’, 30 => 0, 31 => 1, 32 => 2, 33 => 15, 34 => 2, 35 => 1, )

… The only “config” column I have is “config_id” - I don’t have
config_device_brand, config_device_model, config_device_type, config_os, config_browser_version, config_browser_name, config_browser_engine, config_os_version,

UPDATE2: config_*** is tied to DeviceDetection plugin -> disable it and you’re golden :slight_smile: