Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to save Books after upgrade to v22.10 #3812

Closed
2 tasks done
reytechsam opened this issue Oct 26, 2022 · 5 comments
Closed
2 tasks done

Not able to save Books after upgrade to v22.10 #3812

reytechsam opened this issue Oct 26, 2022 · 5 comments

Comments

@reytechsam
Copy link

reytechsam commented Oct 26, 2022

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

After the upgrade, everything seemed to work as usual. The migration tool had no errors and composer install --no-dev also did its job without any problems.
However, when I edit a page, the changes are not saved. I get a green "Saved" message when saving, but no changes are actually saved.

We upgraded from version v22.04.2 directly to version 22.10.

Exact BookStack Version

22.10

Log Content

The laravel log has errors, I however don't know from when:

Next Illuminate\\View\\ViewException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'action' in 'where clause' (SQL: select count(*) as aggregate from `joint_permissions` where `action` = view and `role_id` in (4) and (`joint_permissions`.`has_permission` = 1 or (`joint_permissions`.`has_permission_own` = 1 and `joint_permissions`.`owned_by` = 2)) and `entity_type` = bookshelf) (View: /var/www/wiki/resources/views/common/header.blade.php) (View: /var/www/wiki/resources/views/common/header.blade.php) in /var/www/wiki/vendor/laravel/framework/src/Illuminate/Database/Connection.php:712
Stack trace:
#0 /var/www/wiki/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php(60): Illuminate\\View\\Engines\\CompilerEngine->handleViewException()
#1 /var/www/wiki/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(61): Illuminate\\View\\Engines\\PhpEngine->evaluatePath()
#2 /var/www/wiki/vendor/laravel/framework/src/Illuminate/View/View.php(139): Illuminate\\View\\Engines\\CompilerEngine->get()
#3 /var/www/wiki/vendor/laravel/framework/src/Illuminate/View/View.php(122): Illuminate\\View\\View->getContents()
#4 /var/www/wiki/vendor/laravel/framework/src/Illuminate/View/View.php(91): Illuminate\\View\\View->renderContents()
#5 /var/www/wiki/storage/framework/views/d69defe6b7e4ff730feca928629841592adbd011.php(16): Illuminate\\View\\View->render()
#6 /var/www/wiki/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(107): require('...')
#7 /var/www/wiki/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(108): Illuminate\\Filesystem\\Filesystem::Illuminate\\Filesystem\\{closure}()
#8 /var/www/wiki/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php(58): Illuminate\\Filesystem\\Filesystem->getRequire()
#9 /var/www/wiki/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(61): Illuminate\\View\\Engines\\PhpEngine->evaluatePath()
#10 /var/www/wiki/vendor/laravel/framework/src/Illuminate/View/View.php(139): Illuminate\\View\\Engines\\CompilerEngine->get()
#11 /var/www/wiki/vendor/laravel/framework/src/Illuminate/View/View.php(122): Illuminate\\View\\View->getContents()
#12 /var/www/wiki/vendor/laravel/framework/src/Illuminate/View/View.php(91): Illuminate\\View\\View->renderContents()
#13 /var/www/wiki/vendor/laravel/framework/src/Illuminate/Http/Response.php(69): Illuminate\\View\\View->render()
#14 /var/www/wiki/vendor/laravel/framework/src/Illuminate/Http/Response.php(35): Illuminate\\Http\\Response->setContent()
#15 /var/www/wiki/vendor/laravel/framework/src/Illuminate/Routing/ResponseFactory.php(55): Illuminate\\Http\\Response->__construct()
#16 /var/www/wiki/vendor/laravel/framework/src/Illuminate/Routing/ResponseFactory.php(85): Illuminate\\Routing\\ResponseFactory->make()
#17 /var/www/wiki/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(585): Illuminate\\Routing\\ResponseFactory->view()
#18 /var/www/wiki/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(490): Illuminate\\Foundation\\Exceptions\\Handler->renderHttpException()
#19 /var/www/wiki/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(356): Illuminate\\Foundation\\Exceptions\\Handler->prepareResponse()
#20 /var/www/wiki/app/Exceptions/Handler.php(65): Illuminate\\Foundation\\Exceptions\\Handler->render()
#21 /var/www/wiki/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(196): BookStack\\Exceptions\\Handler->render()
#22 /var/www/wiki/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(173): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->renderHttpResponse()
#23 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleException()
#24 {main}

Next Illuminate\\View\\ViewException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'action' in 'where clause' (SQL: select count(*) as aggregate from `joint_permissions` where `action` = view and `role_id` in (4) and (`joint_permissions`.`has_permission` = 1 or (`joint_permissions`.`has_permission_own` = 1 and `joint_permissions`.`owned_by` = 2)) and `entity_type` = bookshelf) (View: /var/www/wiki/resources/views/common/header.blade.php) (View: /var/www/wiki/resources/views/common/header.blade.php) (View: /var/www/wiki/resources/views/common/header.blade.php) in /var/www/wiki/vendor/laravel/framework/src/Illuminate/Database/Connection.php:712
Stack trace:
#0 /var/www/wiki/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php(60): Illuminate\\View\\Engines\\CompilerEngine->handleViewException()
#1 /var/www/wiki/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(61): Illuminate\\View\\Engines\\PhpEngine->evaluatePath()
#2 /var/www/wiki/vendor/laravel/framework/src/Illuminate/View/View.php(139): Illuminate\\View\\Engines\\CompilerEngine->get()
#3 /var/www/wiki/vendor/laravel/framework/src/Illuminate/View/View.php(122): Illuminate\\View\\View->getContents()
#4 /var/www/wiki/vendor/laravel/framework/src/Illuminate/View/View.php(91): Illuminate\\View\\View->renderContents()
#5 /var/www/wiki/vendor/laravel/framework/src/Illuminate/Http/Response.php(69): Illuminate\\View\\View->render()
#6 /var/www/wiki/vendor/laravel/framework/src/Illuminate/Http/Response.php(35): Illuminate\\Http\\Response->setContent()
#7 /var/www/wiki/vendor/laravel/framework/src/Illuminate/Routing/ResponseFactory.php(55): Illuminate\\Http\\Response->__construct()
#8 /var/www/wiki/vendor/laravel/framework/src/Illuminate/Routing/ResponseFactory.php(85): Illuminate\\Routing\\ResponseFactory->make()
#9 /var/www/wiki/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(585): Illuminate\\Routing\\ResponseFactory->view()
#10 /var/www/wiki/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(490): Illuminate\\Foundation\\Exceptions\\Handler->renderHttpException()
#11 /var/www/wiki/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(356): Illuminate\\Foundation\\Exceptions\\Handler->prepareResponse()
#12 /var/www/wiki/app/Exceptions/Handler.php(65): Illuminate\\Foundation\\Exceptions\\Handler->render()
#13 /var/www/wiki/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(196): BookStack\\Exceptions\\Handler->render()
#14 /var/www/wiki/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(173): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->renderHttpResponse()
#15 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleException()
#16 {main}
  thrown at /var/www/wiki/vendor/laravel/framework/src/Illuminate/Database/Connection.php:712)
[stacktrace]
#0 {main}
"}

PHP Version

8.1.2

Hosting Environment

Ubuntu 22.04 LTS - installed with installation script a few months ago (initial version v22.04.2)

@ssddanbrown
Copy link
Member

Hi @reytechsam,
Please can you provide the current output you get by running the php artisan migrate update step.
Only run it once, and provide the output of only that first run.

@reytechsam
Copy link
Author

reytechsam commented Oct 27, 2022

Yes, of course:
`bookstack@rc:/var/www/wiki# php artisan migrate


  • Application In Production!     *
    

Do you really wish to run this command? (yes/no) [no]:

yes

Migrating: 2022_07_16_170051_drop_joint_permission_type
Migrated: 2022_07_16_170051_drop_joint_permission_type (978.80ms)
Migrating: 2022_08_17_092941_create_references_table
Migrated: 2022_08_17_092941_create_references_table (271.55ms)
Migrating: 2022_09_02_082910_fix_shelf_cover_image_types
Migrated: 2022_09_02_082910_fix_shelf_cover_image_types (6.71ms)
Migrating: 2022_10_07_091406_flatten_entity_permissions_table
Migrated: 2022_10_07_091406_flatten_entity_permissions_table (264.15ms)
Migrating: 2022_10_08_104202_drop_entity_restricted_field
Migrated: 2022_10_08_104202_drop_entity_restricted_field (1,011.41ms)
`

@ssddanbrown
Copy link
Member

@reytechsam Okay, Thanks, are things working okay now?

@reytechsam
Copy link
Author

That's weird, yes it actually seems to be working now. I don't know what I did differently the two times I tried it before though.... Oh well. Thanks a lot!

@ssddanbrown
Copy link
Member

It seems like the php artisan migrate step had not been ran.
If copying and pasting the commands from our update docs, it may be the case that the migrate step, being the last command, sat on your command line without being executed.

Either way, since the issue is resolved I'll close this off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants