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
Error: Column not found: 1054 Unknown column 'log_link_visit_action.custom_var_k6' in 'field list' #8683
Comments
I presume you mean Piwik 2.14.3? Did Piwik work for you right after installation? You did execute the command to add more custom variables right ( |
I got Piwik with wget as described in the installation manual. I checked CHANGELOG.md for version. At line 5 it says "## Piwik 2.14.0". I did not run any console commands. The installation manual did not mention that. |
During the first login it told me there is no data. After the first request to the site it started to show blocks but many of them showed an error about this column. |
Running a console command was not needed so all good. I was just confused by Can you maybe run the command |
"Visits over time" said that graphics could not be displayed. Another widget showed an error about custom_var_v6. Also if I went to Visitors, it showed nothing except the exception. Now I tried to repeat the installation and I have no such problem anymore. I am not sure why it happened before, I repeated step by step exactly. |
I looked through the code a couple of times but still not sure how this can happen. There's nothing that you could have done wrong, it must be a random edge case. Somehow it seems like it installed eg the column @mattab I'm not sure what to do here, I'd suggest to close and see if it happens again as I've never heard of it before and can't really imagine how this is happening. |
It happened once on Piwik Cloud. We were not able to find the cause. It's for sure an edge case. |
@tsteur I ran the command after the second install. Unfortunately I cleaned up bad installation earlier because I had to progress with the customer's task :( Thank you both for your efforts! |
Btw, could you point me to the file or files where creation of these variables happen? I may have a fresh pair of eyes on it :) |
Cool thx. I was surprised the command did not detect an error :)
Here: https://github.com/piwik/piwik/blob/master/plugins/CustomVariables/Model.php#L124 enjoy :) |
If anyone else experiences this issue and error message, please leave a comment as we will be interested to try reproduce or prevent this error |
I was able to reproduce. There are some binlogs from the installation process:
The conclusion: in some rare cases/edge case Piwik is altering piwik_log_visit and piwik_log_conversion during the installation process and adding custom var with index 6. This is not the case for piwik_log_link_visit_action. |
Reproduced on Piwik 2.14.3. |
This would kinda mean that in some cases not all columns are returned here I think https://github.com/piwik/piwik/blob/2.15.0-b8/core/DataAccess/TableMetadata.php#L28 Is it possible that this is maybe related to a Can you execute Maybe we could try to use |
It's set to 0. Regarding master-master - yes we have it enabled, but installator and UI always connect to the same DB. |
Moving back to |
Marking as duplicate of #9211 |
Just installed a fresh Piwik copy (first time in my life). Now getting this error on the current official Piwik build (2.14.0) in every view and many widgets.
The error happens only and only if table prefix is specified during the installation. So this must be the cause. Adding the column manually makes "Visitors" page appear but with an exception which mentions "log_link_visit_action.custom_var_v6" without prefix entered during installation.
It seems some part of Piwik code does not know about table prefix.
The text was updated successfully, but these errors were encountered: