Skip to content
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 after upgrading to 2.7.0 #6280

Closed
zefat opened this issue Sep 24, 2014 · 27 comments
Closed

Error after upgrading to 2.7.0 #6280

zefat opened this issue Sep 24, 2014 · 27 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. worksforme The issue cannot be reproduced and things work as intended.
Milestone

Comments

@zefat
Copy link

zefat commented Sep 24, 2014

Hello,

After upgrading to 2.7.0 (automatic update) I had to manualy execute the SQL statements:

Now i get the following error after loading the site:

API returned an error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'log_link_visit_action.idaction_content_name' in 'where clause' at Pdo.php:234

Please help.

@tsteur
Copy link
Member

tsteur commented Sep 24, 2014

Have you already executed the database updates for Piwik 2.7.0?

@zefat
Copy link
Author

zefat commented Sep 24, 2014

I did:
See here what i did and the results:

UPDATE piwik_option SET option_value = '2.7.0-b4' WHERE option_name = 'version_core';

1 row affected.

ALTER TABLE piwik_log_visit ADD COLUMN user_id VARCHAR(200) NULL;

2849 rows affected.

UPDATE piwik_option SET option_value = 'VARCHAR(200) NULL' WHERE option_name = 'version_log_visit.user_id';

MySQL returned an empty result set (i.e. zero rows).

Looked good. But then I ran into the issue mentioned.

@tsteur
Copy link
Member

tsteur commented Sep 24, 2014

Can you try to run it again? There should be 2 updates

@mikeingz
Copy link

Hi,
I got a similar problem.
My database is not big so I could upgrade automaticly (like usual), but this time each widget in the dashboard has the same error :

Mysqli prepare error: Unknown column 'log_link_visit_action.idaction_content_name' in 'where clause'

@zefat
Copy link
Author

zefat commented Sep 24, 2014

@tsteur . What do you mean with 2 updates. This is all there was. (As far as I could see).

@tsteur
Copy link
Member

tsteur commented Sep 24, 2014

In theory there should be two updates. So after the first one was executed there should be another one. In case the update does not appear can you maybe execute php console core:clear-caches or ./console core:clear-caches in the Piwik root directory?

@mattab
Copy link
Member

mattab commented Sep 24, 2014

@zefat @mikeingz did you maybe run the SQL queries directly in the Mysql? or did you simply run the upgrade in the browser?

@mattab mattab added the Bug For errors / faults / flaws / inconsistencies etc. label Sep 24, 2014
@mattab mattab added this to the Piwik 2.8.0 milestone Sep 24, 2014
@zefat
Copy link
Author

zefat commented Sep 24, 2014

@tsteur : I'm not able to access my server via ssh (so no PHP commands).
@mattab : Executed the sql injections from phpMyAdmin. (table\SQL)

@mikeingz
Copy link

I run the upgrade in the browser.

@mikeingz
Copy link

I did it twice, as explained here : http://piwik.org/faq/how-to-update/#faq_179
Still the same problem

@mikeingz
Copy link

Here is what i see when I go to another tab (Action tab) :

WARN CoreHome[2014-09-24 07:25:00] [c52e7] Failed to get data from API: Mysqli prepare error: Unknown column 'log_link_visit_action.idaction_content_name' in 'where clause'#0 /home/chineast/public_html/piwik/libs/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('\n\t\t\tSELECT\n\t\t\t\t...')#1 /home/chineast/public_html/piwik/libs/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->_construct(Object(Piwik\Db\Adapter\Mysqli), '\n\t\t\tSELECT\n\t\t\t\t...')#2 /home/chineast/public_html/piwik/libs/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('\n\t\t\tSELECT\n\t\t\t\t...')#3 /home/chineast/public_html/piwik/plugins/Actions/Archiver.php(273): Zend_Db_Adapter_Abstract->query('\n\t\t\tSELECT\n\t\t\t\t...', Array)#4 /home/chineast/public_html/piwik/plugins/Actions/Archiver.php(247): Piwik\Plugins\Actions\Archiver->archiveDayQueryProcess('log_action.name...', Array, 'log_link_visit...', '12 DESC, name...', 'log_action.idac...', 'idaction_name', Object(Piwik\RankingQuery))#5 /home/chineast/public_html/piwik/plugins/Actions/Archiver.php(93): Piwik\Plugins\Actions\Archiver->archiveDayActions('50000')#6 /home/chineast/public_html/piwik/core/ArchiveProcessor/PluginsArchiver.php(100): Piwik\Plugins\Actions\Archiver->aggregateDayReport()#7 /home/chineast/public_html/piwik/core/ArchiveProcessor/Loader.php(119): Piwik\ArchiveProcessor\PluginsArchiver->callAggregateAllPlugins(74, '0')#8 /home/chineast/public_html/piwik/core/ArchiveProcessor/Loader.php(73): Piwik\ArchiveProcessor\Loader->prepareAllPluginsArchive(false, false)#9 /home/chineast/public_html/piwik/core/Archive.php(801): Piwik\ArchiveProcessor\Loader->prepareArchive('VisitsSummary')#10 /home/chineast/public_html/piwik/core/Archive.php(614): Piwik\Archive->prepareArchive(Array, Object(Piwik\Site), Object(Piwik\Period\Day))#11 /home/chineast/public_html/piwik/core/Archive.php(556): Piwik\Archive->cacheArchiveIdsAfterLaunching(Array, Array)#12 /home/chineast/public_html/piwik/core/Archive.php(497): Piwik\Archive->getArchiveIds(Array)#13 /home/chineast/public_html/piwik/core/Archive.php(341): Piwik\Archive->get(Array, 'numeric')#14 /home/chineast/public_html/piwik/core/ArchiveProcessor.php(492): Piwik\Archive->getDataTableFromNumeric(Array)#15 /home/chineast/public_html/piwik/core/ArchiveProcessor.php(258): Piwik\ArchiveProcessor->getAggregatedNumericMetrics(Array, false)#16 /home/chineast/public_html/piwik/core/ArchiveProcessor/PluginsArchiver.php(192): Piwik\ArchiveProcessor->aggregateNumericMetrics(Array)#17 /home/chineast/public_html/piwik/core/ArchiveProcessor/PluginsArchiver.php(62): Piwik\ArchiveProcessor\PluginsArchiver->aggregateMultipleVisitsMetrics()#18 /home/chineast/public_html/piwik/core/ArchiveProcessor/Loader.php(114): Piwik\ArchiveProcessor\PluginsArchiver->callAggregateCoreMetrics()#19 /home/chineast/public_html/piwik/core/ArchiveProcessor/Loader.php(73): Piwik\ArchiveProcessor\Loader->prepareAllPluginsArchive(false, false)#20 /home/chineast/public_html/piwik/core/Archive.php(801): Piwik\ArchiveProcessor\Loader->prepareArchive('VisitsSummary')#21 /home/chineast/public_html/piwik/core/Archive.php(614): Piwik\Archive->prepareArchive(Array, Object(Piwik\Site), Object(Piwik\Period\Week))#22 /home/chineast/public_html/piwik/core/Archive.php(556): Piwik\Archive->cacheArchiveIdsAfterLaunching(Array, Array)#23 /home/chineast/public_html/piwik/core/Archive.php(497): Piwik\Archive->getArchiveIds(Array)#24 /home/chineast/public_html/piwik/core/Archive.php(341): Piwik\Archive->get(Array, 'numeric')#25 /home/chineast/public_html/piwik/core/ArchiveProcessor.php(492): Piwik\Archive->getDataTableFromNumeric(Array)#26 /home/chineast/public_html/piwik/core/ArchiveProcessor.php(258): Piwik\ArchiveProcessor->getAggregatedNumericMetrics(Array, false)#27 /home/chineast/public_html/piwik/core/ArchiveProcessor/PluginsArchiver.php(192): Piwik\ArchiveProcessor->aggregateNumericMetrics(Array)#28 /home/chineast/public_html/piwik/core/ArchiveProcessor/PluginsArchiver.php(62): Piwik\ArchiveProcessor\PluginsArchiver->aggregateMultipleVisitsMetrics()#29 /home/chineast/public_html/piwik/core/ArchiveProcessor/Loader.php(97): Piwik\ArchiveProcessor\PluginsArchiver->callAggregateCoreMetrics()#30 /home/chineast/public_html/piwik/core/ArchiveProcessor/Loader.php(72): Piwik\ArchiveProcessor\Loader->prepareCoreMetricsArchive(false, false)#31 /home/chineast/public_html/piwik/core/Archive.php(801): Piwik\ArchiveProcessor\Loader->prepareArchive('Actions')#32 /home/chineast/public_html/piwik/core/Archive.php(614): Piwik\Archive->prepareArchive(Array, Object(Piwik\Site), Object(Piwik\Period\Range))#33 /home/chineast/public_html/piwik/core/Archive.php(556): Piwik\Archive->cacheArchiveIdsAfterLaunching(Array, Array)#34 /home/chineast/public_html/piwik/core/Archive.php(497): Piwik\Archive->getArchiveIds(Array)#35 /home/chineast/public_html/piwik/core/Archive.php(368): Piwik\Archive->get('Actions_actions...', 'blob', NULL)#36 /home/chineast/public_html/piwik/core/Archive.php(459): Piwik\Archive->getDataTable('Actions_actions...', NULL)#37 /home/chineast/public_html/piwik/plugins/Actions/API.php(604): Piwik\Archive::getDataTableFromArchive('Actions_actions...', '1', 'range', 'last7', false, false, false, false, false)#38 /home/chineast/public_html/piwik/plugins/Actions/API.php(123): Piwik\Plugins\Actions\API->getDataTableFromArchive('Actions_actions...', '1', 'range', 'last7', false, false, false, false)#39 [internal function]: Piwik\Plugins\Actions\API->getPageUrls('1', 'range', 'last7', false, false, false, false)#40 /home/chineast/public_html/piwik/core/API/Proxy.php(209): call_user_func_array(Array, Array)#41 /home/chineast/public_html/piwik/core/API/Request.php(216): Piwik\API\Proxy->call('\Piwik\Plugins...', 'getPageUrls', Array)#42 /home/chineast/public_html/piwik/core/ViewDataTable/Request.php(48): Piwik\API\Request->process()#43 /home/chineast/public_html/piwik/core/Plugin/ViewDataTable.php(327): Piwik\ViewDataTable\Request->loadDataTableFromAPI(Array)#44 /home/chineast/public_html/piwik/core/Plugin/Visualization.php(166): Piwik\Plugin\ViewDataTable->loadDataTableFromAPI(Array)#45 /home/chineast/public_html/piwik/core/Plugin/ViewDataTable.php(414): Piwik\Plugin\Visualization->buildView()#46 /home/chineast/public_html/piwik/core/Plugin/Report.php(298): Piwik\Plugin\ViewDataTable->render()#47 /home/chineast/public_html/piwik/plugins/CoreHome/Controller.php(78): Piwik\Plugin\Report->render()#48 /home/chineast/public_html/piwik/plugins/CoreHome/Controller.php(60): Piwik\Plugins\CoreHome\Controller->renderReportWidget('Actions', 'getPageUrls')#49 [internal function]: Piwik\Plugins\CoreHome\Controller->renderReportMenu('Actions', 'getPageUrls')#50 /home/chineast/public_html/piwik/core/FrontController.php(577): call_user_func_array(Array, Array)#51 /home/chineast/public_html/piwik/core/FrontController.php(86): Piwik\FrontController->doDispatch(NULL, NULL, NULL)#52 /home/chineast/public_html/piwik/core/dispatch.php(34): Piwik\FrontController->dispatch()#53 /home/chineast/public_html/piwik/index.php(46): require_once('/home/chineast/...')#54 {main}

@mattab
Copy link
Member

mattab commented Sep 24, 2014

@mikeingz @zefat can you try to disable the Contents plugin and re-enable the plugin?

@zefat
Copy link
Author

zefat commented Sep 24, 2014

@mattab : The Contents plugin is "Inactive" in my install.

@mikeingz
Copy link

same for me

@zefat
Copy link
Author

zefat commented Sep 24, 2014

Ha..!

Enabling it gives me an other SQL statment.
Running that FIXES it..

Thanx @mattab

@mikeingz
Copy link

I can't enable it, as it says "The Piwik configuration file (config/config.ini.php) is not writable, some of your changes might not be saved. Please change permissions of the config file to make it writable."
But the permissions is 0644 and I can't change it.

@zefat
Copy link
Author

zefat commented Sep 24, 2014

@mikeingz : My config.ini.php has also the 644. So it seems the owner of your file is incorrect. You may ask your ISP to take a look at this.

@mikeingz
Copy link

I was finally able to enable the Contents plugin, and it also fixes the problem. Thank you

@Gnarfoz
Copy link

Gnarfoz commented Sep 24, 2014

Also experienced this. Enabling the "Contents" plugin and then doing console core:update helped. (However, console core:clear-caches doesn't work at all, it says that doesn't exist.)

Can I turn off "Contents" again now? Do I need it? (Why was it inactive? I don't recall turning it off.)

@mattab
Copy link
Member

mattab commented Sep 24, 2014

Can I turn off "Contents" again now?

you can try (if there is a problem let us know!)

The Contents plugin though is an awesome new feature! it lets you easily track when certain blocks of your websites (image banners, text links, etc.) are seen by the user, and when they are clicked. See http://piwik.org/docs/content-tracking/ for more info

@RobertCNelson
Copy link

@mattab So if this "Contents" plugin doesn't exist in a piwiki install upgraded to v2.7.0 where would one get it?

Ran:

console core:archive --url=<xyz>

Getting:

Got invalid response from API request: https://<>rigger=archivephp. Response was 'a:2:{s:6:"result";s:5:"error";s:7:"message";s:118:"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'log_link_visit_action.idaction_content_name' in 'where clause'";}'

@mattab
Copy link
Member

mattab commented Sep 26, 2014

Go to SETTINGS > Plugins > Contents > Activate.

@mattab
Copy link
Member

mattab commented Sep 26, 2014

or type: ./console core:plugin activate Contents

@RobertCNelson
Copy link

This is weird, claims to be piwik 2.7 (I also just downloaded piwik.zip and unzip'ed over the directory just in case)

[ps126131]$ php ./console core:plugin activate Contents

  [Exception]
  Plugin 'Contents' cannot be found in the filesystem in plugins/ directory.

core:plugin [--domain="..."] operation plugins1 ... [pluginsN]
INFO CoreConsole[2014-09-26 02:28:13] [b3307] Running Piwik 2.7.0 as Super User

@mattab
Copy link
Member

mattab commented Sep 26, 2014

I also just downloaded piwik.zip and unzip'ed over the directory just in case)

i see the Contents in plugins/ maybe it was unzipped properly or the server cannot read those files?

@mattab mattab closed this as completed Sep 26, 2014
@mattab mattab added the worksforme The issue cannot be reproduced and things work as intended. label Sep 26, 2014
@freaktechnik
Copy link

The contents plugin wasn't activated after the upgrade of a piwik installation for me either, so I only got one update and the broken dashboard. Upon activating it I got the second update and everything was fixed.

@duritong
Copy link

I can confirm that activating the plugin (it wasn't activated after the update), running db-upgrade again made things working again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

8 participants