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

Piwik_DataTable_Renderer doesn't use the Piwik_API_Request $request parms #561

Closed
anonymous-matomo-user opened this issue Feb 20, 2009 · 3 comments
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

Using this query string, I am trying to get back the full expanded datatable in the php array. CorpspediaActions.getActionsFilteredByUser is an extension of Actions that does its own archive processing based upon the original methods (essentially grouping by a custom user_id field).

module=API&method=CorpspediaActions.getActionsFilteredByUser&token_auth=bea1c80a75f6bc12582459358d79a9fc&date=last10&period=day&idsite=1&expanded=true&format=php&idSite=1

I expected the “expanded” property to cause the php array to come back full loaded. But it was not, using a debugger, I can verify that the table and subtables ARE being built, but it is the rendering process that is not including the subtables in the final response.

The problem appears to be caused by the fact that the Piwik_API_Request builds a custon “request” array that it passes to the Piwik_API_ResponseBuilder (who eventually will handle the rendering). The problem is that in the constructor for Piwik_DataTable_Renderer, it doesn’t have access to the custom request array and therefore does not find the expanded parm that was set to “true”.

My gut tells me that we need to find a way to propagate the custom request array to the Renderer so that it can use that array (when available) instead of the plain $_REQUEST array (which is the default).
Keywords: Datatable renderer

@anonymous-matomo-user
Copy link
Author

I am going to try and hack a solution so I can solve my immediate needs, but I hope that you can help with a more elegant solution. Thanks!

@mattab
Copy link
Member

mattab commented Feb 28, 2009

it’s actually a bug, and could be a limitation for people building plugin. increasing priority.

@mattab
Copy link
Member

mattab commented Mar 2, 2009

fixed in 944

refactored and added public method to set all customizations on the Renderer + updating tests

please svn up, test, and if still experience problems please reopen

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