Navigation Menu

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

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

Closed
anonymous-matomo-user opened this issue May 15, 2014 · 6 comments
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@anonymous-matomo-user
Copy link

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

@mattab
Copy link
Member

mattab commented May 19, 2014

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-matomo-user
Copy link
Author

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

@tsteur
Copy link
Member

tsteur commented May 21, 2014

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)?

@anonymous-matomo-user
Copy link
Author

Done.

@tsteur
Copy link
Member

tsteur commented May 22, 2014

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-matomo-user
Copy link
Author

Thanks for support.
I've solved the problem.

@anonymous-matomo-user anonymous-matomo-user added this to the 2.3.0 - Piwik 2.3.0 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.
Projects
None yet
Development

No branches or pull requests

3 participants