Errror in Piwik: ViewDataTable ID 'tableGoals' is already in use!


#1

I’m seeing the following in the apache error log after upgrading to the latest version:

Error in Piwik: ViewDataTable ID ‘tableGoals’ is already in use!, referer: http://www.example.com/index.php?module=CoreHome&action=index&idSite=1&period=range&date=last7

I’ve searched to the best of my abilities and see no other posts regarding this specific error. Apologies if it’s a different form of something common that I just missed.

I’m not sure what it means that the table is “in use.” Does this mean the database has a lock? I’ve tried running the console core:update command, but it says I’m up to date. I haven’t rolled back or reinstalled anything yet, since I can’t tell exactly what’s happening.

Any pointers would be appreciated. If it matters, I’m running Apache 2.2.22, MySql 5.5.35, and PHP 5.3.10


(Matthieu Aubry) #2

Are you seeing it once in the error log or does it keep being logged there?


#3

It’s logged there repeatedly, seemingly every time I try to load various widgets. I get the “oops” error on the widget, and that error in the logs.


#4

From which Piwik version did you update?
Are you using any opcache (apart from APC) that needs to be invalidated?

Sounds like there went something wrong during the update. Maybe some files were not copied correct. Can you download Piwik again and copy over all the files except the config folder?

Alternatively it might help to only replace the file “plugins/Goals/Goals.php”: https://raw.githubusercontent.com/piwik/piwik/2.5.0/plugins/Goals/Goals.php


#5

It looks like replacing the Goals.php file corrects the error. However, that also seems to remove all my goal and ecommerce tracking. I’d rather not have to rebuild the dozens of goals and variables from scratch. Is there an easy way to copy those portions of the old Goals.php over, or will that cause further issues?


#6

I am pretty sure those Goals are still there but simply not displayed. I’d recommend to download Piwik manually and copy it to your server (except the config folder).

Looks like the update didn’t work properly for you.


#7

I have downloaded the latest non-beta version, and replaced all the code in the relevant directory except the config folder.

All seems to be back to normal, so this is a simple solution if anyone experiences the same error.

Thanks for the help, Thomas!