Bookstack SQL error #4896

Closed
opened 2026-02-05 09:24:29 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @ryanvoorspoels on GitHub (Aug 2, 2024).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

We had problems with our server and we reinstall the os en put everything back and now after the login we get a error on bookstack

Exact BookStack Version

latest

Log Content

Illuminate\Database\QueryException
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'activities.loggable_id' in 'where clause' (Connection: mysql, SQL: select * from activities where (exists (select entity_id, entity_type, max(owner_id) as owner_id, max(status) as status from joint_permissions where activities.loggable_id = joint_permissions.entity_id and role_id in (1, 3, 4) and activities.loggable_type = joint_permissions.entity_type group by entity_type, entity_id having (status IN (1, 3) or (owner_id = 3 and status != 2)))) and (loggable_type != page or exists (select id from pages where pages.id = activities.loggable_id and activities.loggable_type = page and pages.draft = 0)) order by created_at desc limit 10 offset 0)

Hosting Environment

php8.3 ubuntu server 24.04 apache

Originally created by @ryanvoorspoels on GitHub (Aug 2, 2024). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario We had problems with our server and we reinstall the os en put everything back and now after the login we get a error on bookstack ### Exact BookStack Version latest ### Log Content Illuminate\Database\QueryException SQLSTATE[42S22]: Column not found: 1054 Unknown column 'activities.loggable_id' in 'where clause' (Connection: mysql, SQL: select * from `activities` where (exists (select `entity_id`, `entity_type`, max(owner_id) as owner_id, max(status) as status from `joint_permissions` where `activities`.`loggable_id` = `joint_permissions`.`entity_id` and `role_id` in (1, 3, 4) and `activities`.`loggable_type` = `joint_permissions`.`entity_type` group by `entity_type`, `entity_id` having (status IN (1, 3) or (owner_id = 3 and status != 2)))) and (`loggable_type` != page or exists (select `id` from `pages` where `pages`.`id` = `activities`.`loggable_id` and `activities`.`loggable_type` = page and `pages`.`draft` = 0)) order by `created_at` desc limit 10 offset 0) ### Hosting Environment php8.3 ubuntu server 24.04 apache
OVERLORD added the 🐕 Support label 2026-02-05 09:24:29 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Aug 2, 2024):

Hi @ryanvoorspoels,
When you say "put everything back" what exactly do you mean? Did you restore an old content? Please detail the steps followed there if possible.

@ssddanbrown commented on GitHub (Aug 2, 2024): Hi @ryanvoorspoels, When you say "put everything back" what exactly do you mean? Did you restore an old content? Please detail the steps followed there if possible.
Author
Owner

@ssddanbrown commented on GitHub (Oct 16, 2024):

Since there's been no further follow-up I'll go ahead and close this off.

@ssddanbrown commented on GitHub (Oct 16, 2024): Since there's been no further follow-up I'll go ahead and close this off.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#4896