SQLSTATE[42S22]: Column not found: 1054 Unknown - New Install


#1

Hi, I installed and configured Piwik yesterday and it was all working fine, tried to login today and I get this message “SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘log_visit.location_provider’ in ‘field list’”

Anyone else have/had this problem?

I saw a post about something similar happening after an upgrade, but I did not perform an upgrade, only a clean install.

Any help or pointers will be much appreciated


#2

Hy,

we run into a similar problem. We installed Version 2.1 yesterday. The system is working fine but we have several Warnings in Dashboard-Widgets,
for example:

WARN Referrers[2014-03-19 14:30:00] [70dea] Failed to get data from API: Mysqli prepare error: Unknown column ‘log_visit.location_provider’ in ‘field list’

A look at our database-tables showed that actually there’s no table log_visit. But there is indeed a table piwik_log_visit. The difference oviously is the prefix that we configured during the Installation.

Is it possible that parts of the system (in our case several Widgets) don’t use the Prefix as they should?


(Matthieu Aubry) #3

Is it possible that parts of the system (in our case several Widgets) don’t use the Prefix as they should?

Not really possible or we would have heard this bug I think. But well really everything is possible. can you post all errros?


#4

Same with me - I am not able to figure out.

here are error -

WARN Referrers[2014-03-23 04:37:29] [0d307] Failed to get data from API: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘log_visit.location_provider’ in ‘field list’#0 /home/yashwant/public_html/analytics/libs/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)#1 /home/yashwant/public_html/analytics/libs/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)#2 /home/yashwant/public_html/analytics/libs/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query(’???SELECT???..’, Array)#3 /home/yashwant/public_html/analytics/core/Db/Adapter/Pdo/Mysql.php(229): Zend_Db_Adapter_Pdo_Abstract->query(’???SELECT???..’, Array)#4 /home/yashwant/public_html/analytics/core/DataAccess/LogAggregator.php(319): Piwik\Db\Adapter\Pdo\Mysql->query(’???SELECT???..’, Array)#5 /home/yashwant/public_html/analytics/core/DataAccess/LogAggregator.php(228): Piwik\DataAccess\LogAggregator->queryVisitsByDimension(Array)#6 /home/yashwant/public_html/analytics/plugins/Provider/Archiver.php(20): Piwik\DataAccess\LogAggregator->getMetricsFromVisitByDimension(‘location_provid…’)#7 /home/yashwant/public_html/analytics/core/ArchiveProcessor/PluginsArchiver.php(98): Piwik\Plugins\Provider\Archiver->aggregateDayReport()#8 /home/yashwant/public_html/analytics/core/ArchiveProcessor/Loader.php(118): Piwik\ArchiveProcessor\PluginsArchiver->callAggregateAllPlugins(‘1’, ‘0’)#9 /home/yashwant/public_html/analytics/core/ArchiveProcessor/Loader.php(72): Piwik\ArchiveProcessor\Loader->prepareAllPluginsArchive(false, false)#10 /home/yashwant/public_html/analytics/core/Archive.php(789): Piwik\ArchiveProcessor\Loader->prepareArchive(‘Referrers’)#11 /home/yashwant/public_html/analytics/core/Archive.php(608): Piwik\Archive->prepareArchive(Array, Object(Piwik\Site), Object(Piwik\Period\Day))#12 /home/yashwant/public_html/analytics/core/Archive.php(550): Piwik\Archive->cacheArchiveIdsAfterLaunching(Array, Array)#13 /home/yashwant/public_html/analytics/core/Archive.php(490): Piwik\Archive->getArchiveIds(Array)#14 /home/yashwant/public_html/analytics/core/Archive.php(366): Piwik\Archive->get(‘Referrers_searc…’, ‘blob’, NULL)#15 /home/yashwant/public_html/analytics/core/Archive.php(452): Piwik\Archive->getDataTable(‘Referrers_searc…’, NULL)#16 /home/yashwant/public_html/analytics/plugins/Referrers/API.php(45): Piwik\Archive::getDataTableFromArchive(‘Referrers_searc…’, ‘1’, ‘day’, ‘2014-03-22’, false, false, NULL)#17 /home/yashwant/public_html/analytics/plugins/Referrers/API.php(138): Piwik\Plugins\Referrers\API->getDataTable(‘Referrers_searc…’, ‘1’, ‘day’, ‘2014-03-22’, false, false)#18 [internal function]: Piwik\Plugins\Referrers\API->getKeywords(‘1’, ‘day’, ‘2014-03-22’, false, false)#19 /home/yashwant/public_html/analytics/core/API/Proxy.php(209): call_user_func_array(Array, Array)#20 /home/yashwant/public_html/analytics/core/API/Request.php(215): Piwik\API\Proxy->call(’\Piwik\Plugins…’, ‘getKeywords’, Array)#21 /home/yashwant/public_html/analytics/core/ViewDataTable/Request.php(48): Piwik\API\Request->process()#22 /home/yashwant/public_html/analytics/core/Plugin/ViewDataTable.php(271): Piwik\ViewDataTable\Request->loadDataTableFromAPI(Array)#23 /home/yashwant/public_html/analytics/core/Plugin/Visualization.php(166): Piwik\Plugin\ViewDataTable->loadDataTableFromAPI(Array)#24 /home/yashwant/public_html/analytics/core/Plugin/ViewDataTable.php(358): Piwik\Plugin\Visualization->buildView()#25 /home/yashwant/public_html/analytics/core/Plugin/Controller.php(228): Piwik\Plugin\ViewDataTable->render()#26 /home/yashwant/public_html/analytics/plugins/Referrers/Controller.php(155): Piwik\Plugin\Controller->renderReport(‘getKeywords’)#27 [internal function]: Piwik\Plugins\Referrers\Controller->getKeywords()#28 /home/yashwant/public_html/analytics/core/FrontController.php(521): call_user_func_array(Array, Array)#29 /home/yashwant/public_html/analytics/core/FrontController.php(84): Piwik\FrontController->doDispatch(NULL, NULL, NULL)#30 /home/yashwant/public_html/analytics/core/dispatch.php(30): Piwik\FrontController->dispatch()#31 /home/yashwant/public_html/analytics/index.php(47): require_once(’/home/yashwant/…’)#32 {main}
SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘log_visit.location_provider’ in ‘field list’

Please let me know how to resolve it…


#5

I tried to login today and by magic it has fixed itself, I never tried any fixes, so I dont know how it now allows me in??


#6

NO mine is not fixed…

how u did?

See the attached file for more info…


(Matthieu Aubry) #7

Thanks for the report! I fixed this bug in Fixes #4886 · matomo-org/matomo@54a3399 · GitHub

please apply both changes and try again


#8

Hi Matt,

This is not resolved,
Issue with VIsit Over Time
Visitor Browser
Search Engine
Server Time

and
rest all.

Please look on those too


#9

I have the same problem with the error described here.

matt, you replied above that you posted a fix at github.com. I went to github. How do I apply the fix?

Also, yashwant replied that issues remain. Any word whether everything is now resolved?

I apologize for not not being more tenchnical. Thanks for your help.


#10

Hi M

Please give some resolution on this.

Kitlley n I facing same issues…


#11

I have the same problem. Please give us a solution. Even give us a sql and we can correct the table definition.

Thanks.


(Matthieu Aubry) #12

please use the latest beta version 2.1.1-b9 I would like to test early beta and RC releases, how do I enable automatic updates to use these development versions? - Analytics Platform - Matomo


#13

Matt, Thanks for looking into this. I updated to the latest beta version 2.1.1-b9.

Unfortunately, the issue for me is not resolved. I wonder why, apparently, only a few of us are having this problem since the 2.1.0 upgrade. Maybe you can draw a conclusion from the error below. Best regards.

WARN VisitFrequency[2014-03-29 16:27:06] [771cc] Failed to get data from API: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘log_visit.location_provider’ in ‘field list’#0 /home2/ktilleyc/public_html/piwik/libs/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)#1 /home2/ktilleyc/public_html/piwik/libs/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)#2 /home2/ktilleyc/public_html/piwik/libs/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query(’???SELECT???..’, Array)#3 /home2/ktilleyc/public_html/piwik/core/Db/Adapter/Pdo/Mysql.php(229): Zend_Db_Adapter_Pdo_Abstract->query(’???SELECT???..’, Array)#4 /home2/ktilleyc/public_html/piwik/core/DataAccess/LogAggregator.php(319): Piwik\Db\Adapter\Pdo\Mysql->query(’???SELECT???..’, Array)#5 /home2/ktilleyc/public_html/piwik/core/DataAccess/LogAggregator.php(228): Piwik\DataAccess\LogAggregator->queryVisitsByDimension(Array)#6 /home2/ktilleyc/public_html/piwik/plugins/Provider/Archiver.php(20): Piwik\DataAccess\LogAggregator->getMetricsFromVisitByDimension(‘location_provid…’)#7 /home2/ktilleyc/public_html/piwik/core/ArchiveProcessor/PluginsArchiver.php(98): Piwik\Plugins\Provider\Archiver->aggregateDayReport()#8 /home2/ktilleyc/public_html/piwik/core/ArchiveProcessor/Loader.php(118): Piwik\ArchiveProcessor\PluginsArchiver->callAggregateAllPlugins(‘2’, ‘0’)#9 /home2/ktilleyc/public_html/piwik/core/ArchiveProcessor/Loader.php(72): Piwik\ArchiveProcessor\Loader->prepareAllPluginsArchive(false, false)#10 /home2/ktilleyc/public_html/piwik/core/Archive.php(802): Piwik\ArchiveProcessor\Loader->prepareArchive(‘VisitsSummary’)#11 /home2/ktilleyc/public_html/piwik/core/Archive.php(615): Piwik\Archive->prepareArchive(Array, Object(Piwik\Site), Object(Piwik\Period\Day))#12 /home2/ktilleyc/public_html/piwik/core/Archive.php(557): Piwik\Archive->cacheArchiveIdsAfterLaunching(Array, Array)#13 /home2/ktilleyc/public_html/piwik/core/Archive.php(498): Piwik\Archive->getArchiveIds(Array)#14 /home2/ktilleyc/public_html/piwik/core/Archive.php(342): Piwik\Archive->get(Array, ‘numeric’)#15 /home2/ktilleyc/public_html/piwik/plugins/VisitsSummary/API.php(59): Piwik\Archive->getDataTableFromNumeric(Array)#16 [internal function]: Piwik\Plugins\VisitsSummary\API->get(‘1’, ‘day’, ‘2014-02-28,2014…’, false, ‘nb_uniq_visitor…’)#17 /home2/ktilleyc/public_html/piwik/core/API/Proxy.php(209): call_user_func_array(Array, Array)#18 /home2/ktilleyc/public_html/piwik/plugins/API/API.php(452): Piwik\API\Proxy->call(’\Piwik\Plugins…’, ‘get’, Array)#19 [internal function]: Piwik\Plugins\API\API->get(‘1’, ‘day’, ‘2014-02-28,2014…’, false, false)#20 /home2/ktilleyc/public_html/piwik/core/API/Proxy.php(209): call_user_func_array(Array, Array)#21 /home2/ktilleyc/public_html/piwik/core/API/Request.php(215): Piwik\API\Proxy->call(’\Piwik\Plugins…’, ‘get’, Array)#22 /home2/ktilleyc/public_html/piwik/core/ViewDataTable/Request.php(48): Piwik\API\Request->process()#23 /home2/ktilleyc/public_html/piwik/core/Plugin/ViewDataTable.php(271): Piwik\ViewDataTable\Request->loadDataTableFromAPI(Array)#24 /home2/ktilleyc/public_html/piwik/core/Plugin/Visualization.php(166): Piwik\Plugin\ViewDataTable->loadDataTableFromAPI(Array)#25 /home2/ktilleyc/public_html/piwik/core/Plugin/ViewDataTable.php(358): Piwik\Plugin\Visualization->buildView()#26 /home2/ktilleyc/public_html/piwik/core/Plugin/Controller.php(200): Piwik\Plugin\ViewDataTable->render()#27 /home2/ktilleyc/public_html/piwik/plugins/VisitFrequency/Controller.php(77): Piwik\Plugin\Controller->renderView(Object(Piwik\Plugins\CoreVisualizations\Visualizations\JqplotGraph\Evolution))#28 /home2/ktilleyc/public_html/piwik/plugins/VisitFrequency/Controller.php(24): Piwik\Plugins\VisitFrequency\Controller->getEvolutionGraph(Array)#29 [internal function]: Piwik\Plugins\VisitFrequency\Controller->index()#30 /home2/ktilleyc/public_html/piwik/core/FrontController.php(505): call_user_func_array(Array, Array)#31 /home2/ktilleyc/public_html/piwik/core/FrontController.php(85): Piwik\FrontController->doDispatch(NULL, NULL, NULL)#32 /home2/ktilleyc/public_html/piwik/core/dispatch.php(34): Piwik\FrontController->dispatch()#33 /home2/ktilleyc/public_html/piwik/index.php(47): require_once(’/home2/ktilleyc…’)#34 {main}


(Matthieu Aubry) #14

I have spent some time trying to reproduce the issue but unfortunately for me it is working fine…

Could you please try the latest 2.1.1 beta10? I would like to test early beta and RC releases, how do I enable automatic updates to use these development versions? - Analytics Platform - Matomo

If you have the issue with this version, please post again the error message…


#15

Hello, Matt.

I just installed the latest 2.1.1 beta10 as you suggested. Following is the error message. I hope this is helpful. Thank you.

WARN VisitsSummary[2014-04-01 02:04:14] [a43e2] Failed to get data from API: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘log_visit.location_provider’ in ‘field list’#0 /home2/ktilleyc/public_html/piwik/libs/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)#1 /home2/ktilleyc/public_html/piwik/libs/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)#2 /home2/ktilleyc/public_html/piwik/libs/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query(’???SELECT???..’, Array)#3 /home2/ktilleyc/public_html/piwik/core/Db/Adapter/Pdo/Mysql.php(229): Zend_Db_Adapter_Pdo_Abstract->query(’???SELECT???..’, Array)#4 /home2/ktilleyc/public_html/piwik/core/DataAccess/LogAggregator.php(319): Piwik\Db\Adapter\Pdo\Mysql->query(’???SELECT???..’, Array)#5 /home2/ktilleyc/public_html/piwik/core/DataAccess/LogAggregator.php(228): Piwik\DataAccess\LogAggregator->queryVisitsByDimension(Array)#6 /home2/ktilleyc/public_html/piwik/plugins/Provider/Archiver.php(20): Piwik\DataAccess\LogAggregator->getMetricsFromVisitByDimension(‘location_provid…’)#7 /home2/ktilleyc/public_html/piwik/core/ArchiveProcessor/PluginsArchiver.php(98): Piwik\Plugins\Provider\Archiver->aggregateDayReport()#8 /home2/ktilleyc/public_html/piwik/core/ArchiveProcessor/Loader.php(118): Piwik\ArchiveProcessor\PluginsArchiver->callAggregateAllPlugins(‘2’, ‘0’)#9 /home2/ktilleyc/public_html/piwik/core/ArchiveProcessor/Loader.php(72): Piwik\ArchiveProcessor\Loader->prepareAllPluginsArchive(false, false)#10 /home2/ktilleyc/public_html/piwik/core/Archive.php(802): Piwik\ArchiveProcessor\Loader->prepareArchive(‘VisitsSummary’)#11 /home2/ktilleyc/public_html/piwik/core/Archive.php(615): Piwik\Archive->prepareArchive(Array, Object(Piwik\Site), Object(Piwik\Period\Day))#12 /home2/ktilleyc/public_html/piwik/core/Archive.php(557): Piwik\Archive->cacheArchiveIdsAfterLaunching(Array, Array)#13 /home2/ktilleyc/public_html/piwik/core/Archive.php(498): Piwik\Archive->getArchiveIds(Array)#14 /home2/ktilleyc/public_html/piwik/core/Archive.php(342): Piwik\Archive->get(Array, ‘numeric’)#15 /home2/ktilleyc/public_html/piwik/plugins/VisitsSummary/API.php(59): Piwik\Archive->getDataTableFromNumeric(Array)#16 [internal function]: Piwik\Plugins\VisitsSummary\API->get(‘1’, ‘day’, ‘2014-03-01,2014…’, false, ‘nb_visits’)#17 /home2/ktilleyc/public_html/piwik/core/API/Proxy.php(209): call_user_func_array(Array, Array)#18 /home2/ktilleyc/public_html/piwik/plugins/API/API.php(452): Piwik\API\Proxy->call(’\Piwik\Plugins…’, ‘get’, Array)#19 [internal function]: Piwik\Plugins\API\API->get(‘1’, ‘day’, ‘2014-03-01,2014…’, false, ‘nb_visits’)#20 /home2/ktilleyc/public_html/piwik/core/API/Proxy.php(209): call_user_func_array(Array, Array)#21 /home2/ktilleyc/public_html/piwik/core/API/Request.php(215): Piwik\API\Proxy->call(’\Piwik\Plugins…’, ‘get’, Array)#22 /home2/ktilleyc/public_html/piwik/core/ViewDataTable/Request.php(48): Piwik\API\Request->process()#23 /home2/ktilleyc/public_html/piwik/core/Plugin/ViewDataTable.php(271): Piwik\ViewDataTable\Request->loadDataTableFromAPI(Array)#24 /home2/ktilleyc/public_html/piwik/core/Plugin/Visualization.php(166): Piwik\Plugin\ViewDataTable->loadDataTableFromAPI(Array)#25 /home2/ktilleyc/public_html/piwik/core/Plugin/ViewDataTable.php(358): Piwik\Plugin\Visualization->buildView()#26 /home2/ktilleyc/public_html/piwik/core/Plugin/Controller.php(200): Piwik\Plugin\ViewDataTable->render()#27 /home2/ktilleyc/public_html/piwik/plugins/VisitsSummary/Controller.php(94): Piwik\Plugin\Controller->renderView(Object(Piwik\Plugins\CoreVisualizations\Visualizations\JqplotGraph\Evolution))#28 [internal function]: Piwik\Plugins\VisitsSummary\Controller->getEvolutionGraph()#29 /home2/ktilleyc/public_html/piwik/core/FrontController.php(505): call_user_func_array(Array, Array)#30 /home2/ktilleyc/public_html/piwik/core/FrontController.php(85): Piwik\FrontController->doDispatch(NULL, NULL, NULL)#31 /home2/ktilleyc/public_html/piwik/core/dispatch.php(34): Piwik\FrontController->dispatch()#32 /home2/ktilleyc/public_html/piwik/index.php(47): require_once(’/home2/ktilleyc…’)#33 {main}

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


(Matthieu Aubry) #16

Can you paste on pastebin.com the content of your config/config.ini.php file? (without the database information)


#17

hELLO mATT

I PASTED CONFIG FILE AT pastebin.com

here is link - following is default fie
http://pastebin.com/Qv97uhDN
http://pastebin.com/hJZWBpHG

this link is org config.ini for my website - confi.ini - Pastebin.com


#18

Matt,

As per your request, here is my config/config.ini.php file paste (without database information). Thanks!

http://pastebin.com/0ehCHNuW


(Matthieu Aubry) #19

Can you try to “uninstall” the Provider plugin? This should hopefully fix it!


#20

Thanks, Matt! Uninstalling the Provider plugin worked.

Will it be possible to install the Provider plugin later after more releases/possible fixes? How will I know when? Just by checking release logs for info that addresses the Provider plugin?

Thanks so much for your help.