BookStackApp / BookStack

A platform to create documentation/wiki content built with PHP & Laravel
https://www.bookstackapp.com/
MIT License
15.22k stars 1.9k forks source link

Editing a page creates an unknown error #1618

Closed Bolthier closed 3 years ago

Bolthier commented 5 years ago

This is probably more on the support part, as I'm not exactly sure what is causing the issue on my instance. The only thing I could do was restoring the last version.

Describe the bug While editing a page an unknown error occurs. Everything else on the website works as intended.

Steps To Reproduce Steps to reproduce the behavior:

  1. Create a page or edit a page
  2. See error message

Expected behavior Editor to appear.

Error SQLSTATE[42S22]: Column not found: 1054 Unknown column 'template' in 'where clause' (SQL: select count() as aggregate from pages where (draft = 0 or (draft = 1 and created_by = 3)) and (exists (select from joint_permissions where pages.id = joint_permissions.entity_id and joint_permissions.entity_type = BookStack\Page and role_id in (5, 6, 7, 8, 9, 10, 16, 17, 18, 19, 20, 21, 22, 23, 24, 27, 28, 31) and action = view and (has_permission = 1 or (has_permission_own = 1 and created_by = 3)))) and draft = 0 and template = 1)

Screenshots image

Your Configuration (please complete the following information):

ssddanbrown commented 5 years ago

Hi @Bolthier, Sounds very similar to #1617, Can you try running the migration command again and see if that gets things working again?

Bolthier commented 5 years ago

I will. Probably on the next weekend again.

Thank you for the response. I'll close this issue after updating.

ssddanbrown commented 3 years ago

Since the last comment on this issue is relatively old I'm going to close this. If the issue remains and is something you still require to be fixed please open a new issue, referencing this one.