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

token_auth not authenticating for some widgets correctly #3410

Closed
anonymous-matomo-user opened this issue Sep 27, 2012 · 3 comments
Closed
Assignees
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

This is a revisit of this old bug - [1260]

The VisitSummary and VisitFrequency widgets don't work when using a token_auth string for authentication. The above bug allowed the Widgetize pluging to authenticate with token_auth, however some widgets make direct api calls to plugins bypassing the widgetize plugin. For example the Visit Overview widget (i.e. - [http://demo.piwik.org/index.php?module=Widgetize&action=iframe&moduleToWidgetize=VisitsSummary&actionToWidgetize=index&idSite=7&period=day&date=yesterday&disableLink=1&widget=1]), doesn't authenticate correctly for the little spark line graphs at the bottom if authenticating via token_auth. Each of these are generated via separate calls direct to the VisitsSummary module, which doesn't authenticate via the token_auth string. Also, if you add any other sparklines via the 'Metrics to Plot' box in the widget, this also makes direct calls to the module and doesn't authenticate correctly. The same can be seen with the VisitFrequency widget, when you add extra sparklines.

To fix this I added a call to "Piwik_API_Request::reloadAuthUsingTokenAuth();" as the first line of the getEvolutionGraph() function in both VisitsSummary and VisitFrequency Controller.php files. I'm not going to do a patch for this as I'm not sure if this is a recommended approach as it seems the getEvolutionGraph() function is called internally by other things - so this may introduce other problems.

@anonymous-matomo-user
Copy link
Author

Attachment: Actually - here's a patch - just in case it helps...
token_auth_bugfix.patch

@mattab
Copy link
Member

mattab commented Oct 6, 2012

I guess it would make sense to auth the graphs as well, but let's double check this patch.

@mattab
Copy link
Member

mattab commented Apr 4, 2013

it's working now!

@anonymous-matomo-user anonymous-matomo-user added this to the 1.12 - The Great 1.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