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


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:

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?


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.


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”:


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?


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.


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!