Skip to content


Subversion checkout URL

You can clone with
Download ZIP


hideColumns/showColumns not working in Metadata API #3582

tsteur opened this Issue · 8 comments

3 participants



I found those "hideColumns/showColumns" parameters in API documentation. As I do always display only one value in Piwik Mobile App, this could be an interesting way to reduce the amount of transferred data a lot.

When using showColumns + Metadata.getProcessedReport I get a division by zero.



Warning: Division by zero in /home/piwik/www/ on line 59 

Backtrace -->

#0 Piwik_ErrorHandler(...) called at [/home/piwik/www/]
#1 Piwik_DataTable_Filter_AddColumnsProcessedMetrics->filter(...) called at [/home/piwik/www/]
#2 Piwik_DataTable->filter(...) called at [/home/piwik/www/]
#3 Piwik_API_API->handleTableReport(...) called at [/home/piwik/www/]
#4 Piwik_API_API->getProcessedReport(...) called at [:]
#5 call_user_func_array(...) called at [/home/piwik/www/]
#6 Piwik_API_Proxy->call(...) called at [/home/piwik/www/]
#7 Piwik_API_Request->process(...) called at [/home/piwik/www/]
#8 Piwik_API_Controller->index(...) called at [:]
#9 call_user_func_array(...) called at [/home/piwik/www/]
#10 Piwik_FrontController->dispatch(...) called at [/home/piwik/www/]

Am I doing something wrong? Please login when calling this method.

"showColumns" doesn't crash but seems to be simply not working. If I unterstand it right, the report below should contain only "nb_visits" column.

When using "showColumns" on reports like VisitsSummary.get I get another error:

Fatal error: Call to a member function getRows() on a non-object in /home/piwik/www/ on line 920

Please also give feedback since which version those parameters are available.


Thanks for the report. Indeed it would help. Also this could help with SVG Maps which uses metadata API and only need a subset of columns.

hideColumns/showColumns are available since Piwik 1.8.4


Hi @tsteur, if you want to show only one or more columns and hide the rest you'd use showColumns=column1,column2. If you wanted to hide one or more columns you'd use hideColumns=column1,column2. The two latter URLs are correct, but their output isn't. I'll look into what's causing the bug(s).


(In [7696]) Fixes #3582, fix bug w/ showColumns/hideColumns params where processed metrics that shouldn't have shown in reports were shown.


@tsteur I fixed the problem w/ the first two URLs. There's no problem for me w/ the third one (can't reproduce). Let me know if there are any lingering issues.


Looks good, just one feedback:

  • it should also remove the columns from others keys where they can appear eg. <metricsDocumentation>

(In [7697]) Fixes #3582, apply hide/show metrics to metrics docs & metrics in processed reports.


(In [7698]) Refs #3582, hide processed metrics w/ showColumns/hideColumns.


(In [7699]) Refs #3582, fix bug in last commit.

@tsteur tsteur added this to the 1.10 - Piwik 1.10 milestone
@diosmosis diosmosis was assigned by tsteur
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.