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
Column not found: 1054 Unknown column 'log_visit.location_browser_lang' in 'field list'" #8304
Comments
For me it is the column 'log_visit.config_os' that is missing since the update ... (I also had to add config_browser_name, config_browser_version, and some of the other config-columns. I updated by uploading the files via FTP.) |
@benjaminpick is your Administration > System check showing green ticks everywhere? To fix the issue, try this workaround: http://forum.piwik.org/read.php?2,127838,page=1#msg-127967 |
I see an error message behind: always_populate_raw_post_data=-1 . All the other checks are OK. |
I have also found this forum post, I tried posting a follow up there but got this error message:
I have green ticks for everything in the System Check, the error message via cron, recieved soon after the upgrade to 2.14.0:
The steps I followed doing the upgrade are documented here. |
@chriscroome check your server error log, what is the error in there? |
I tried the suggestion in #issue-94023907
There is nothing in the Nginx error log, the php-fpm log, in the Piwik archive log there is this:
|
@chriscroome your tables don't have |
Right, if you look at the comment above I did run the SQL without the table prefix. Site ID 11 uses the WP-Piwik WordPress module: http://reconomy.org/ |
If you get error |
The error message above was from before the SQL was run -- the SQL appears to have run without a problem. The cron job,
|
Running the cron job manually:
|
Same for me. Upgrade from 2.8 to 2.14 and fields were missing in table log_visit. |
i have this problem too:Column not found: |
I ran this SQL to fix the issue:
The cron job now runs without any errors. |
Hi! Same me: Column not found: 1054 Unknown column 'log_visit.location_browser_lang' in 'field list'" what can I do? |
There are two possible reasons for this bug (experienced by many users):
Would anyone in this thread know whether you used to have those columns, or do you know whether these columns were never there in your tables? |
Yes these columns were there before. (I don't have a backup to compare
but there was definitly OS information on my data before, which I lost
during the upgrade.)
|
@benjaminpick and everyone: which version of Piwik did you upgraded from? We will investigate this issue for sure! |
I've asked that in the german forums... Most of them updated from 2.13.1, but some also from older versions like 2.10.0 |
Hi @tsteur Note: these columns were moved from one plugin to another, maybe this bug occurs when column/dimensions are moved from one plugin to another, and our column detector somehow gets confused and drops the columns? The weird thing is that it only affects a few users and not all consistently. added |
Same problem: Upgrade from 2.13.x. PHP 5.4, MariaDB 10 with custom prefix. |
We have plain text backups of our MySQL database, looking in the oldest one (2015-05-18) and grepping for one of the missing columns (
|
We have the same problem: Upgrade from 2.13.0 with "The Manual Three-Step Update", MySQLDB |
If this column was actually dropped then the only option is to restore this data from a backup/access log files. Reports for historical data are most likely aggregated so you will have access to these information. It won't work only in case you decide to rearchive something or if you decide to create a new segment and would like to have also old data segmented (to display segmented report that was created by using this column's data or to segment using values from this particular column). |
We run an archiving job every hour, so loss should be minimized by that. However, I tried replaying access logs (both the regular visits and the tracking API requests), and the visits contained in those seem to not show up at all, even after forcing archival again (as suggested by the log analytics script)?! |
Log import summary should show you how many requests were replayed. It's also possible that you have to invalidate this date range in order to re-archive. But before doing so, just confirm that there is raw data for this date range (you can calculate number of rows available e.g. in the log_visit table - please remember to use indexed fields - idsite and visit_last_action_time). |
+1 Same issue |
Well, that's what happenend during the update today (2.10 -> 2.14.1) and took hours:
After that the UserLanguage Plugin stopped working:
So, right now I am readding the column again like you proposed in the first post which will take me some hours. |
Hello, I have the same problem here (2.13.1 updated to 2.14 and also 2.13.1 updated to 2.14.1). The Piwik system test shows an error for 'always_populate_raw_post_data', no other errors. The update was performed manually by overwriting the files on the server with the current version and performing the database update offered when accessing Piwik. The columns were present prior to the update. After performing the update in addition the icons for browser and OS of visits were missing and some other error messages/warnings appeared (e.g., when opening the page normally showing statistics for all websites a red Piwik warning was shown (server overload, contact admin if the problem occurs again), but only when selecting the current date). |
Same problem here after upgrading from Piwik 2.9.1. |
@mattab Think I found the cause for this bug: https://github.com/piwik/piwik/blob/master/core/Updates/2.14.0-b1.php#L20 The update uninstalls the UserSettings plugin which shared dimensions w/ the various other plugins used now. If the dimension files still exist on an install, the Plugin manager will uninstall the dimensions, removing the columns. FYI, can't work on a fix right now, hopefully this helps. |
@quba invalidating is something other than re-archiving? I'm assuming this is not related to this issue, but more a general problem with the log analytics script? |
Here's the API call to invalidate reports (it means that data won't be deleted but re-archived during next archiving process): However first check if you have raw data for the date range that you've imported (e.g. by using the visitor log). |
Thanks, I'll give that a try. My |
Good find. In different versions we removed dimensions out of the In theory, when we remove files, they should be removed on the a user's Piwik as well. Possibly this did not work in some cases on previous updates for various reasons. Maybe file permissions problems or maybe someone updated from a version that did not yet contain this logic of removing core files that no longer exist. In Not sure what a proper fix for this issue could be. If files need to be removed during an update and it does not work, we should maybe display an error asking to remove those files manually. Maybe when working on #5985 we can take such things into consideration. |
after applying the alter query in the first post, i had another error: |
Actually, one thing we could do before uninstalling a dimension is to check whether the same dimension is provided by another plugin (with DB field, |
Just FYI: Another question is why the columns were not installed automatically afterwards again (although it was good in this case so we could find this issue). I'm working on a fix to prevent this issue in the future but noticed the entry in the option table was not removed. For the system it was still marked as installed. This might be some race condition with Updater and Plugin/Uninstall |
…efines the same, make sure to correctly mark the dimension as uninstalled
FYI: I'm working on an update that will remove some option entries so the wrongly removed dimensions will be at least re-installed again automatically if still needed. |
Great! But for sure we need to make sure that such dimensions are not removed (in case other plugin implements them) because we don't want to lose raw data. |
Sure thing. I issued a PR for both already |
Great! |
I am attempting a staged update from 2.13.1 to 2.14.2 and still getting this issue. What the update says:
What is really happening though is an ALTER TABLE Is the dropping of this column expected? If so, why doesn't it show up in the dry run? I have no third party plugins and the only plugins that are disabled are the Example* and DBStats plugin. |
Dropping of this column is not expected. It doesn't show up in the dry run because the updater disables a plugin which can lead to further queries in another update. As the plugin was not disabled yet when collecting all the queries for the dry run, those queries won't be visible in the initial one. I'm not quite sure why it still wants to drop the column. Maybe the opcache was not invalidated correctly. Do you know if you disabled any plugins in your Piwik installation? Eg Maybe we could provide another update that forces the deletion of old "UserSettings Dimensions" just to be sure in case something else goes wrong. Referring once more to the refactoring of the updater in #5985 |
This is a list of the plugins activated on my system. It has been this way since I first installed Piwik just over a year ago. I just want to be able to successfully update to 2.14.2. If you have any suggestions of things I can try manually I have a dev setup I can try it on.
|
Few users reported having this error after upgrading to 2.14.0:
Column not found: 1054 Unknown column 'log_visit.location_browser_lang' in 'field list'"
in this forum post and this one and few other ones.
The workaround is to manually run the SQL query:
ALTER TABLE piwik_log_visit ADD COLUMN location_browser_lang VARCHAR(20) NOT NULL;
In general, I'm wondering why some users have this problem? currently I don't understand how this could occur.
The text was updated successfully, but these errors were encountered: