1.7.1 - sparklines via API now need login


#1

Hi there,

For some time now, I’ve included a snapshot of stats on our CMS dashboard, using the piwik API and a handful of widgets. Since upgrading to 1.7.1 the sparklines on Visits Summary > Visits Overview are only showing if you are logged in. The text is all there and directly opening the URL to the image shows a login box and

Error: You can’t access this resource as it requires an ‘view’ access for the website id = 3.

Other widgets on the page are working (Last visits graph, Actions > Pages). I’m using the token_auth, not allowing annonymous to view.

I originally used the auto updater but have since deleted the whole folder and re-extracted from the zip (locally, not via FTP).

Thanks in advance for any advice.


(Matthieu Aubry) #2

I I’m surprised you say it worked before, because it shouldn’t work before. The sparklines would need the token_auth too - there is a bug: Dashboard & Sparklines should work when embedded with token_auth · Issue #1353 · matomo-org/matomo · GitHub


#3

oh wow, I was convinced they were working before, sorry!

I run in a replicated, multi-server enviroment and the replication kept bugging out breaking piwik, so when I finally fixed that I checked everything fully and I guess it must have been the first time I’ve tested it properly to see that.

Thanks for the speedy response, sorry to waste your time.


#4

Hi,

It’s seems that I have the same problem. After I updated the piwik version to 1.7.1 the VisitsSummary sparklines are broken (attached a screeshot)

This worked in the 1.6 version

My link to access the widget:
http://stats.domain.com/index.php?module=Widgetize&action=iframe&moduleToWidgetize=VisitsSummary&actionToWidgetize=index&idSite=1&period=month&date=2012-04-12&disableLink=1&widget=1&token_auth=[my token]

Anonymus user has no access (if I set to have view access, it works), but according to the documentation it should work with the token_auth.

Thanks in advance for any advice.