You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello.
We have a lot of pages, books and shelves inside our bookstack service.
Now we have An unknown error occurred" we try to save any role via bookstack web interface.
The "production.ERROR: SQLSTATE[HY000]: General error: 1390 Prepared statement contains too many placeholders (SQL: select entity_id, entity_type, role_id, view from entity_permissions where .. " record is placed into our laravel.log when error occurs.
As side effect, after saving any role some users lost his access to some books and shelves. So I need to restore it with
"php artisan bookstack:regenerate-permissions " bookstack command.
To remove same error from regenerate-permission command I have increase my mariadb
max_allowed_packet parameter to 1073741824
This mariadb reconfiguration was helpful for cli-command, but not for "Save Role" button
Steps to Reproduce
Go to Settings ->Roles
Select any role ( go to Edit Role page)
Click Save Role
See error
Expected Behaviour
Instead of error page we expected to see refreshed Edit Role page. Also we excepted that saving role will not break user access to bookstack objects.
@digitlimit Sure, go ahead, but I've marked this for the next feature release (targeting end of year) so ideally any PR would be in by the end of next week. If that's okay and you want to take it on let me know and I'll assign this to you.
Query of existing entity permissions during view permission generation
could cause timeouts or SQL placeholder limits due to massive whereOr
query generation, where an "or where" clause would be created for each
entity type/id combo involved, which could be all within 20 books.
This updates the query handling to use a query per type involved, with
no "or where"s, and to be chunked at large entity counts.
Also tweaked role-specific permission regen to chunk books at
half-previous rate to prevent such a large scope being involved on each
chunk.
For #4695
I've now made changes in 02d94c8 with the intent to address this.
The erroring query is now done in a more scale-aware & scale-efficient way that'll better handle large amounts of content.
This will be part of the next feature release, due at the end of this month.
Thanks @VladimirVershinin for raising and detailing the issue.
Describe the Bug
Hello.
We have a lot of pages, books and shelves inside our bookstack service.
Now we have An unknown error occurred" we try to save any role via bookstack web interface.
The "production.ERROR: SQLSTATE[HY000]: General error: 1390 Prepared statement contains too many placeholders (SQL: select
entity_id
,entity_type
,role_id
,view
fromentity_permissions
where .. " record is placed into our laravel.log when error occurs.As side effect, after saving any role some users lost his access to some books and shelves. So I need to restore it with
"php artisan bookstack:regenerate-permissions " bookstack command.
To remove same error from regenerate-permission command I have increase my mariadb
max_allowed_packet parameter to 1073741824
This mariadb reconfiguration was helpful for cli-command, but not for "Save Role" button
Steps to Reproduce
Expected Behaviour
Instead of error page we expected to see refreshed Edit Role page. Also we excepted that saving role will not break user access to bookstack objects.
Screenshots or Additional Context
laravel.log.gz
Browser Details
Firefox 115.5.0esr linux
Exact BookStack Version
v23.10.4
The text was updated successfully, but these errors were encountered: