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
Matomo 4 - Missing field config_browser_name in table log_conversion #17181
Comments
What version were you updating from? After adding the column were you able to update successfully? |
I made an update from version 3.13.3 to 4.1.1. I also had to add For example
After adding config_client_type tinyint and log_conversion.config_browser_name matomo works as i can see. I tried to redo the database update with |
@datango did you have the config_client_type and config_browser_name columns in your tables before yodatubg? |
I found a problem with ALTER TABLE Before update: SELECT @@SESSION.sql_mode; I removed "STRICT_TRANS_TABLES": ALTER TABLE 92 Rows have a length of field referer_url longer then 1500; MariaDB [matomo]> select referer_url from piwik_log_visit where CHAR_LENGTH(referer_url) > 1500; I am trying a new update right now. I come back with the result. I think the update script should fail on errors like "ERROR 1406 (22001): Data too long for column 'referer_url' at row 2364". |
The sql is still not working cause of "dublicate modify COLUMN Executing ALTER TABLE Executing ALTER TABLE I called these sql commands after the updater manualy to get the error message: MariaDB [matomo]> ALTER TABLE MariaDB [matomo]> ALTER TABLE |
Hi @datango how do did you update the files for Matomo 4? Did you use our one-click UI update or did you update the files manually? If you updated manually, did you remove all old files? Any chance you have maybe some plugins disabled like the It looks like for some reason the region column is missing. You could try to add it manually like this:
|
Hi @tsteur! I updated matomo manually (on a test system) like i do it since many years:
Now i changed it to
Did i missed something important? After that the update worked as expected. The tables have the needed structure. BUT these problems remain:
What do you think? |
This would have been potentially not quite correct and could have caused issues in the past unless you ran The new flow sounds definitely good and I understand everything works now? Regarding the update error: When there is an error during the update it would stop if the error is in Matomo core (which most updates are). If there is an error as part of a plugin then it would continue but disable that particular plugin. I can see though that we should maybe also stop the update when there is an issue with a plugin that is bundled with core. That could be good indeed. I've created #17213 For the real live check I created this issue: #17211 be indeed great to have but also very time consuming and difficult to implement unfortunately. It could help though avoid various issues.
Matomo sets the needed SQL mode (see https://github.com/matomo-org/matomo/blob/4.1.1/core/Db.php#L36 ) already every time we connect to the database. I don't know if it's maybe possible for MySQL to configure that it can't be overwritten? If I understand things correctly then things are working again and we can close this issue? |
Also if the sql_mode can not be forced to be set by matomo - it should be checked by matomo update script, that it is correctly set. Yes, update works now. Thx! |
Minor side note that may be of interest for others: I had the same error after automatically updating via bitnami/matomo docker image. For me it solves the issue by disabling and re-activating the mentioned "DevicesDetection" plugin from the UI. |
From what I see it should always be possible to set the sql_mode actually. Be great to let us know if it's possible to prevent this somehow. I'll close this for now but happy to follow up should there are ways to prevent changing the sql mode in a session. Thanks |
I still have the problem that the column config_browser_name is not added by console core:update. I had to add it manualy. Otherwise console core:archive produces errors. (Matomo 4.1.1)
"Mysqli prepare error: Unknown column 'log_conversion.config_browser_name' in 'field list' - in plugin DevicesDetection
Related: #16868
The text was updated successfully, but these errors were encountered: