derixithy Posted November 5, 2016 Share Posted November 5, 2016 (edited) When i add anything below user-admin-all, like user-admin-artist, i get an 'Syntax error or access violation' error on the userlist page in the admin. full error SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.id FROM `pages` JOIN field_roles AS field_roles1 ON field_roles1.pages_id' at line 9 No results are returned (not surprising). below that: template=3, parent=29, include=all, limit=25, status<9999999, id!=40, roles=(roles.count=1, roles=37), roles=(roles=1018|1119), sort=name I get that on any role with any custom permission. I don't know how to track down the error. I'm using ProcessWire 3.0.39, PHP 5.6.26 and MySQL 5.6.33 Solution Do not add the roles manually! Select the ones from the Install predefined system permissions list. Edited February 11, 2017 by derixithy Solution found Link to comment Share on other sites More sharing options...
Robin S Posted November 5, 2016 Share Posted November 5, 2016 (edited) 5 hours ago, derixithy said: below that: template=3, parent=29, include=all, limit=25, status<9999999, id!=40, roles=(roles.count=1, roles=37), roles=(roles=1018|1119), sort=name It looks like you have some filters set in the Users lister. Does the error still occur if you remove the filters? Also, the title of your post is a little unclear - you have added "user-admin-artist" as a permission and not the name of a role, right? Just to confirm, you followed a procedure like this... Installed user-admin permission: Access > Permissions > Add New > Install predefined system permissions > user-admin Installed user-admin-all permission: Access > Permissions > Add New > Install predefined system permissions > user-admin-all Installed user-admin-artist permission: Access > Permissions > Add New > Install predefined system permissions > user-admin-artist Gave user-admin and user-admin-artist permissions to a role: Access > Roles > artist (or whatever) > checked 'user-admin' and 'user-admin-artist' Welcome to the forums BTW Edited November 5, 2016 by Robin S 1 Link to comment Share on other sites More sharing options...
derixithy Posted November 7, 2016 Author Share Posted November 7, 2016 I tested with different users and different roles. The title looks correct to me because all user-admin-* roles give an error, if you know better let me know. The roles have each an user-admin-somerolename permission added. If i change the role to user-admin-all i get no error. if i change it to a specific role i get an sql error. The rolenames are correct because they are found 'roles=(roles=1018|1119)' but somehow it gives an error. Link to comment Share on other sites More sharing options...
derixithy Posted February 11, 2017 Author Share Posted February 11, 2017 I never got it fixed on that install, and i got it again on the latest dev version. Now i reread it i understand what went wrong. I added them as custom roles and did not select them from the predefined system roles list. I deleted them and selected the build in once. The problem is fixed now. Could someone tell me wat the difference is between selecting the builtin ones or create your own? -edit: spelling Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now