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

DataTable is filtered by twice DataTableGenericFilter. And that causes a bug #3853

Closed
anonymous-matomo-user opened this issue Mar 21, 2013 · 2 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. worksforme The issue cannot be reproduced and things work as intended.
Milestone

Comments

@anonymous-matomo-user
Copy link

Use case:

  1. Go to "Visitor Browser" widget on dashboard. (Rows 1-5 of 14 displayed)
  2. Click on graph display type
  3. Pick up some additional metrics ("Visitors")
  4. Switch back to table view. (Rows 1-5 of 5) !!!!

That happens because jqplot.js adds extra "disable_generic_filters=0" to request.

dataTable.param.disable_generic_filters = '0';

And on ResponseBuilder this variable causes immediate DataTableGenericFilter processing. (as DataTableGenericFilter called on getResponse() it is triggered twice)

if(0 == Piwik_Common::getRequestVar('disable_generic_filters', '0', 'string', $this->request))
               {
                       $genericFilter = new Piwik_API_DataTableGenericFilter($this->request);
                       $genericFilter->filter($datatable);
               }

Removing that lines from ResponseBuilder.php and(or) jqplot.js fixes bug.
However I'm not sure about side effects of this.

@anonymous-matomo-user
Copy link
Author

Second call to DataTableGenericFilter is done on ViewDataTable

@mattab
Copy link
Member

mattab commented Jan 10, 2014

cannot reproduce in latest piwik

@anonymous-matomo-user anonymous-matomo-user added this to the 2.x - The Great Piwik 2.x Backlog 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. worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

2 participants