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

Error: You can't access this resource as it requires 'view' access for the website id = 60. #13406

Closed
tohn opened this issue Sep 10, 2018 · 12 comments · Fixed by #13446
Closed
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@tohn
Copy link

tohn commented Sep 10, 2018

I'm using Page Overlay for one of our sites and have super user permissions for my user. Therefore I don't understand, why I can't see these bubbles on the page overlay. Everthing else (like Open Row Evolution, Open Transitions, Open segmented Visitor Log) works fine.

Both sites (Matomo + Website) use TLS. But I only get the page, this error and after clicking ok in the right corner: "Loading following pages ..."

I enabled debug mode and got this output:

DEBUG Piwik\Plugin\Manager[2018-09-10 15:33:36 UTC] [43c7b] Loaded plugins: CorePluginsAdmin, CoreAdminHome, CoreHome, WebsiteMeasurable, Diagnostics, CoreVisualizations, Proxy, API, Widgetize, Transitions, LanguagesManager, Actions, Dashboard, MultiSites, Referrers, UserLa
nguage, DevicesDetection, Goals, Ecommerce, SEO, Events, UserCountry, GeoIp2, VisitsSummary, VisitFrequency, VisitTime, VisitorInterest, RssWidget, Monolog, Login, UsersManager, SitesManager, Installation, CoreUpdater, CoreConsole, ScheduledReports, UserCountryMap, Live, C
ustomVariables, PrivacyManager, ImageGraph, Overlay, SegmentEditor, Insights, Morpheus, Contents, Resolution, DevicePlugins, Heartbeat, Intl, Marketplace, ProfessionalServices, UserId, CustomPiwikJs, DBStats, Provider, Bandwidth, CustomOptOut, LogViewer, SecurityInfo, Site
Migration, TasksTimetable                                                                                                                                                                                                                                                        
DEBUG API[2018-09-10 15:33:36 UTC] [43c7b] /var/www/matomo/core/Access.php(505): You can't access this resource as it requires 'view' access for the website id = 60.                                                                                                            
DEBUG API[2018-09-10 15:33:36 UTC] [43c7b] #0 /var/www/matomo/core/Piwik.php(511): Piwik\Access->checkUserHasViewAccess('60')                                                                                                                                                    
DEBUG API[2018-09-10 15:33:36 UTC] [43c7b] #1 /var/www/matomo/plugins/SitesManager/API.php(223): Piwik\Piwik::checkUserHasViewAccess('60')                                                                                                                                       
DEBUG API[2018-09-10 15:33:36 UTC] [43c7b] #2 /var/www/matomo/plugins/Overlay/API.php(47): Piwik\Plugins\SitesManager\API->getSiteFromId('60')                                                                                                                                   
DEBUG API[2018-09-10 15:33:36 UTC] [43c7b] #3 [internal function]: Piwik\Plugins\Overlay\API->getExcludedQueryParameters('60')                                                                                                                                                   
DEBUG API[2018-09-10 15:33:36 UTC] [43c7b] #4 /var/www/matomo/core/API/Proxy.php(236): call_user_func_array(Array, Array)                                                                                                                                                        
DEBUG API[2018-09-10 15:33:36 UTC] [43c7b] #5 /var/www/matomo/core/API/Request.php(262): Piwik\API\Proxy->call('\\Piwik\\Plugins\\...', 'getExcludedQuer...', Array)                                                                                                             
DEBUG API[2018-09-10 15:33:36 UTC] [43c7b] #6 /var/www/matomo/plugins/API/Controller.php(41): Piwik\API\Request->process()                                                                                                                                                       
DEBUG API[2018-09-10 15:33:36 UTC] [43c7b] #7 [internal function]: Piwik\Plugins\API\Controller->index()                                                                                                                                                                         
DEBUG API[2018-09-10 15:33:36 UTC] [43c7b] #8 /var/www/matomo/core/FrontController.php(560): call_user_func_array(Array, Array)                                                                                                                                                  
DEBUG API[2018-09-10 15:33:36 UTC] [43c7b] #9 /var/www/matomo/core/FrontController.php(146): Piwik\FrontController->doDispatch(NULL, NULL, NULL)                                                                                                                                 
DEBUG API[2018-09-10 15:33:36 UTC] [43c7b] #10 /var/www/matomo/core/dispatch.php(34): Piwik\FrontController->dispatch()                                                                                                                                                          
DEBUG API[2018-09-10 15:33:36 UTC] [43c7b] #11 /var/www/matomo/index.php(27):require_once('/var/www/matomo...')                                                                                                                                                                  
DEBUG API[2018-09-10 15:33:36 UTC] [43c7b] #12 {main}  

I'm quite lost right now. Can somebody help me? :)

@fdellwing
Copy link
Contributor

@rmpel
Copy link

rmpel commented Sep 12, 2018

Hey, I was gonna say that :p

Indeed I started a topic on the Matomo forums with the exact same problem.
I'll keep an eye on this GH-issue as well, thanks :)

@diosmosis
Copy link
Member

Can reproduce, not sure what the exact cause is from a glance, but will look into this today.

@diosmosis diosmosis added this to the 3.6.1 milestone Sep 12, 2018
@diosmosis diosmosis self-assigned this Sep 12, 2018
@diosmosis diosmosis added the Bug For errors / faults / flaws / inconsistencies etc. label Sep 12, 2018
@diosmosis
Copy link
Member

FYI fixed in #13420.

@rmpel
Copy link

rmpel commented Sep 13, 2018

I'd like to confirm the fix works beautifully. I manually applied the changes (as I could not find a 'get diff file' button) and have no more issues.

Thank you!!!

@fdellwing
Copy link
Contributor

I created a patch file for you (txt file ending, because github) :)

13406-overlay-api.txt

@Findus23
Copy link
Member

Semi-Secret github trick:
If you add .patch to a pull request url, you get the patch file:

https://github.com/matomo-org/matomo/pull/13420.patch

@mattab
Copy link
Member

mattab commented Sep 25, 2018

Nice fix @diosmosis. Question: did our UI tests notice this bug, if not is it maybe possible to tweak/add a UI test so it reproduces this issue?

@diosmosis
Copy link
Member

It's related to authentication and the UI tests disable authentication (otherwise, we'd have to login first for every UI test, which would take a lot more time).

@mattab mattab closed this as completed Oct 2, 2018
@mattab mattab reopened this Oct 2, 2018
@mattab
Copy link
Member

mattab commented Oct 2, 2018

FYI #13420 was closed and not merged. So the new fix is #13446
Do you mind testing this patch instead @tohn @fdellwing @rmpel : https://patch-diff.githubusercontent.com/raw/matomo-org/matomo/pull/13446.patch ?
Alternatively we'll release a beta later this week which will include this fix so you'll be able to confirm it works then

@peterkraume
Copy link

@mattab When will you release the next beta? I'd like to test the patch.

@mattab
Copy link
Member

mattab commented Oct 8, 2018

the beta3 is just now available @peterkraume 👍

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

Successfully merging a pull request may close this issue.

7 participants