Unable to get permission key for view.
Permalink
Recently I've dibbled into allowing users create their own accounts, however when a user logs in they're immediately met with the error
I had assumed this is an issue based on permissions and so I have tinkered around with them, ensuring that all the pages of the site are capable of being viewed by both the default groups "Guest and Registered Users".
Unfortunately even after fiddling around and Googling a lot, I haven't found a resolve related to this issue.
Can someone please help? - I have provided a screenshot of the error in more detail.
Unable to get permission key for view
I had assumed this is an issue based on permissions and so I have tinkered around with them, ensuring that all the pages of the site are capable of being viewed by both the default groups "Guest and Registered Users".
Unfortunately even after fiddling around and Googling a lot, I haven't found a resolve related to this issue.
Can someone please help? - I have provided a screenshot of the error in more detail.
Hi there, thank you for your response.
Whist the site that I am using has Google Analytics, it's actually using it as an addon as to get a nice UI within the dashboard itself; using this project.https://github.com/c5labs/google-analytics...
As for the issue, I have attempted to remove this addon entirely and ran some tests. But nothing surrounding this proved a resolve.
Thank you again however!
Whist the site that I am using has Google Analytics, it's actually using it as an addon as to get a nice UI within the dashboard itself; using this project.https://github.com/c5labs/google-analytics...
As for the issue, I have attempted to remove this addon entirely and ran some tests. But nothing surrounding this proved a resolve.
Thank you again however!
Go to your database manager and look for the 'PermissionKeys' table. Then sort on 'pkHandle' to see whether a 'view_page' or 'page' handle exists.
If both exist: I don't know.
If only 'view_page' exists: change your code so it checks the 'view_page' pk instead of the 'page' pk/
If none exist: that'd be weird, because 'view_page' is a default pk. Then I'd add it manually in the database.
If both exist: I don't know.
If only 'view_page' exists: change your code so it checks the 'view_page' pk instead of the 'page' pk/
If none exist: that'd be weird, because 'view_page' is a default pk. Then I'd add it manually in the database.
Hi there, thank you for your reply!
I've checked the database and I have found the table "view_page" however the "page" one is non-existent.
I hate to ask, but I am a complete novice to the programming world and wonder what you meant by adding "view_page" to the code? Could you please provide an example if it's not too much to ask.
Thank you in advance.
I've checked the database and I have found the table "view_page" however the "page" one is non-existent.
I hate to ask, but I am a complete novice to the programming world and wonder what you meant by adding "view_page" to the code? Could you please provide an example if it's not too much to ask.
Thank you in advance.
It's this line:https://github.com/c5labs/google-analytics/blob/master/src/GoogleAna...
That should probably be "return $permissions->canViewPage();"
That should probably be "return $permissions->canViewPage();"
Amazing, thank you for the fast reply. I will make the edit as soon as possible and let you know if it resolved the issue.
Thanks again!
Thanks again!
Did it work for you? If so, you might wanna post an issue in that Github repository.
Hi there, strangely. It seems to have worked and non admin users can login again!
I'll post a bug report now, thank you so much for your help.
I'll post a bug report now, thank you so much for your help.
Hmm, it seems that the issue isn't resolved just yet. The previous answer which I marked as being the best worked as it resolved the issue with users not being capable of logging in.
However every so often, on random occasion I'm now being presented with another error relating to the Google Analytics addon.
Which you can see in the screenshot below. - I've also reported this on the official repo too.
However every so often, on random occasion I'm now being presented with another error relating to the Google Analytics addon.
Which you can see in the screenshot below. - I've also reported this on the official repo too.
...but I don't see why it should be listed in the call stack. Can you temporarily remove GA from your site?