Odd issue with accessing only one site's data via API with view only user API key

Hi there,

I have a bizarre issue. I have a Piwik server with about 1000 websites being tracked and I have found that I cannot access the website data of one specific site via the API without using the Admin account API key.

If I use the standard, view only user’s, API key I get the following error when trying to access certain data:


You can't access this resource as it requires an 'view' access for the website id =

Or I get the following error if I try to access the visitorMap:


Fatal error: Cannot use string offset as an array in /home/primarysite/www/piwik/plugins/UserCountryMap/Controller.php on line 54 

Creating another user doesn’t help either, even if they are admin. All other websites that I’ve tested work fine with the other API keys.

Edit: Version of Piwik v1.1.1 and I have upgraded to v2.0.2 and v2.0.3 and the issue exists in both instances.

Okay, I fixed this by going to the website in the dropdown in the Settings > Users page and reapplying the existing view access permission (or I might have had to set the permission to no access and back again) for the user which we use for API access.