bbeer Posted July 4, 2022 Share Posted July 4, 2022 We have a strange problem in PW 3.0.201 dev. When using the Button save + next we get following error. SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') GROUP BY pages.id ORDER BY pages.sort' at line 4In /wire/core/PageFinder.php line 821 and SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') GROUP BY pages.id ORDER BY pages.sort' at line 4In /wire/core/WireDatabasePDO.php line 937 Link to comment Share on other sites More sharing options...
Gideon So Posted July 5, 2022 Share Posted July 5, 2022 Hi @bbeer Maybe you need to check your MYSQL / MariaDB version. Gideon Link to comment Share on other sites More sharing options...
bbeer Posted August 4, 2022 Author Share Posted August 4, 2022 Sorry that I ask again about this error. We checked MYSQL and really can't find any problem there. Anyone any idea, what this could be? Your help is much appreciated. Link to comment Share on other sites More sharing options...
bbeer Posted August 4, 2022 Author Share Posted August 4, 2022 after further investigation I can close this post. It must be a browser bug of a specific user. Sorry about that. Link to comment Share on other sites More sharing options...
bbeer Posted August 18, 2022 Author Share Posted August 18, 2022 I'm sorry but I have to open that topic again as it is even trickier. This Problem is user role specific. As Superuser, all works smooth, as soon as you have another role, you get this error. Your help is much appreciated. Link to comment Share on other sites More sharing options...
snck Posted March 25 Share Posted March 25 This seems to be a bug in the core that is still present in the current release (3.0.229, main branch) and has to do with the query generation for the next page. For superusers there is no problem because of PageFinder.php:2230 (getQueryAllowedTemplates()), superuser just skips the checks for allowed templates in the query completely: Comparing the database queries for the superusers with the one for other (logged in) users showed the error in the query. Query for superuser: Query for other (logged in) user: It is quite obvious that there is an error in the SQL syntax. The problem has to do with the number of templates that a user is allowed to edit. In this case, the user (editor, no superuser) is allowed to edit all templates (inheriting page-edit permissions from the homepage). As soon as I add a template that no user is allowed to even view, the „Save + Next“ action is working as expected and—obviously—the query changes and everything is working: Query for editor after adding a template that nobody (except superusers) can access: Maybe @ryan can have a look and dig a little deeper? This might be an edge case that almost never happens (because in most cases template access might be restricted for every role to some extend) and adding a template without access is a workaround, but it would be cool to have it fixed nonetheless. Cheers Flo 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