Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Websites drop-down list and All Websites Dashboard view not working #5170

Closed
anonymous-piwik-user opened this Issue · 6 comments

3 participants

Anonymous Piwik user Matthieu Aubry Thomas Steur
Anonymous Piwik user

I still have this problem. Websites drop-down list is showing me only one website and the All Websites Dashboard is not working. It gives me this error You can't access this resource as it requires an 'view' access for the website id = 1. Also The Visitor Map widget is not working, it throws this error TypeError: a is undefined
http://www.domain.com/piwik/index.php?module=Proxy&action=getCoreJs&cb=a4a4d02151e413a21b0c867f68bbc77d at Line 4

I am using Piwik 2.2.3-b4

Matthieu Aubry
Owner

Thanks for the report. Can you try to delete the files in piwik/tmp/assets/

and then open this URL you pasted above -> does it show the Javascript?

do you see any error in your server error log?

Anonymous Piwik user

When I open the above link it shows me the javascript code.

I've deleted all files in piwik/temp/assets/ but it is the same error and I suppose it is generated by a script regarding Visitor Map because the map isn't loading. No errors on server log.

TypeError: a is undefined
http://www.domain.com/piwik/index.php?module=Proxy&action=getCoreJs&cb=a95ed2f642d825a066e6df7039b8d72a
Line 4

Thomas Steur
Owner

Hey andreij,

to debug this issue we would probably need access to your Piwik instance. Is this possible? Would you mind creating a Piwik user for us and send us the credentials? You can delete the user afterwards again. If so, can you send the details to hello @ piwik.org and leave a comment afterwards here (in case mails goes into spam folder)?

Thomas Steur
Owner

I had a look and noticed the problem is a "301 Moved Permanently" redirect when the UI performs a POST request to the API.

For instance there is a redirect from

POST http://www.yourdomain.xy/piwik/index.php?apiAction=getAll&apiModule=MultiSites&date=2014-05-20&enhanced=1&filter_limit=0&format=JSON&hideMetricsDoc=1&idSite=1&method=API.getProcessedReport&module=API&period=day&showColumns=label,nb_visits

to

GET http://www.yourdomain.xy/piwik/?apiAction=getAll&apiModule=MultiSites&date=2014-05-20&enhanced=1&filter_limit=0&format=JSON&hideMetricsDoc=1&idSite=1&method=API.getProcessedReport&module=API&period=day&showColumns=label,nb_visits

To be concrete your server seems to redirect all
http://www.yourdomain.xy/piwik/index.php
requests to
http://www.yourdomain.xy/piwik/

The actual POST request contains your API auth token. This is needed for authentication and to make sure you have access to the requested website. As there is a redirect the auth token gets lost meaning there is no permission to view the page.

I have debugged the All Websites Dashboard as well as the Country Map and both fails because of this reason. Maybe you can have a look on the server and display this redirect?

You can delete the account again.

Anonymous Piwik user

Thanks for support.
I've solved the problem.

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.