Notice: Undefined index: dimension in plugins/API/RowEvolution.php on line 334 #5951

mattab opened this Issue Aug 7, 2014 · 2 comments


None yet

2 participants

mattab commented Aug 7, 2014

Url to reproduce:,2014-07-05&apiModule=VisitsSummary&apiAction=get&legendAppendMetric=1&labelUseAbsoluteUrl=1&format=original&token_auth=anonymous

Error message:

Notice: Undefined index: dimension in /home/piwik-demo/www/ on line 334

Backtrace -->

#0 Piwik\Error::errorHandler(...) called at [/home/piwik-demo/www/]
#1 Piwik\Plugins\API\RowEvolution->getRowEvolutionMetaData(...) called at [/home/piwik-demo/www/]
#2 Piwik\Plugins\API\RowEvolution->getRowEvolution(...) called at [/home/piwik-demo/www/]
#3 Piwik\Plugins\API\API->getRowEvolution(...) called at [:]
#4 call_user_func_array(...) called at [/home/piwik-demo/www/]
#5 Piwik\API\Proxy->call(...) called at [/home/piwik-demo/www/]
#6 Piwik\API\Request->process(...) called at [/home/piwik-demo/www/]
#7 Piwik\Plugins\API\Controller->index(...) called at [:]
#8 call_user_func_array(...) called at [/home/piwik-demo/www/]
#9 Piwik\FrontController->doDispatch(...) called at [/home/piwik-demo/www/]
#10 Piwik\FrontController->dispatch(...) called at [/home/piwik-demo/www/]
#11 require_once(...) called at [/home/piwik-demo/www/]

Expected instead: no notice message.

@mattab mattab added this to the Piwik 2.5.0 milestone Aug 7, 2014
@mattab mattab added the Bug label Aug 7, 2014
tsteur commented Aug 8, 2014

I had a quick look but do not really know how to fix it. I didn't simply wanted to add an array_key_exists check and ignore the error as it might have side effects. Dimension seems to be used in quite a few places (UI etc). Maybe it is rather appropriate to throw an exception "Not supported" if a report like "VisitsSummary.get" has no dimension?

mattab commented Aug 9, 2014

@tsteur +1 for throwing exception as if it's not fully supported.

@tsteur tsteur added a commit that closed this issue Aug 9, 2014
@tsteur tsteur fixes #5951 throw an exception in getRowEvolution if a report is requ…
…est that does not have a dimension
@tsteur tsteur closed this in 3b962d9 Aug 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment