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

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

mattab opened this issue Aug 7, 2014 · 2 comments
Bug For errors / faults / flaws / inconsistencies etc.


Copy link

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
Copy link

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?

Copy link
Member Author

mattab commented Aug 9, 2014

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

@tsteur tsteur closed this as completed in 3b962d9 Aug 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Bug For errors / faults / flaws / inconsistencies etc.
None yet

No branches or pull requests

2 participants