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

Call to undefined method Piwik_DataTable_Array::getFirstRow #2815

Closed
anonymous-matomo-user opened this issue Dec 7, 2011 · 2 comments
Closed
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Milestone

Comments

@anonymous-matomo-user
Copy link

I use latest Piwik 1.6.

To get goals for specific site, I use this API:
http://my.piwik.org/index.php?module=API&method=Goals.get&idSite=128&period=day&date=2011-12-01,2011-12-05&format=JSON&token_auth=TokenHere&idGoal=goal1

And everything is OK.

But when I want to get goals for all sites, I set "idSite=all" and get error:
Fatal error: Call to undefined method Piwik_DataTable_Array::getFirstRow() in /home/piwik/www/plugins/Goals/API.php on line 412

"idSite=all" works perfectly for visitors and I expect the same for goals. idSite="128,129,130" gives the same error.

I looked into the code but was unable to understand what's wrong. There's a protected function enrichTable($table) which is called in two places and I suspect one of them calls it with wrong type. I am not familiar with piwik internals to fix it properly.
Keywords: Goals, Piwik_DataTable_Array, getFirstRow

@mattab
Copy link
Member

mattab commented Dec 22, 2011

Also: ( ! ) Fatal error: Call to undefined method Piwik_DataTable_Array::getFirstRow() in /home/www/plugins/API/API.php on line 913
index.php?module=API&method=API.get&format=XML&idSite=3,7&period=day&date=2011-11-22,2011-12-21&expanded=1&idGoal=-1&filter_limit=100

@mattab
Copy link
Member

mattab commented Feb 13, 2012

(In [5826]) Fixes #2815
Thanks for the report @zet
Please confirm this fixes for you too?

@anonymous-matomo-user anonymous-matomo-user added this to the 1.7 Piwik 1.7 milestone Jul 8, 2014
This issue was closed.
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. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

2 participants