Unable to read books after upgrade to 0.25.1 from 0.24.1 #1030

Closed
opened 2026-02-04 23:28:54 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @markbeazley on GitHub (Feb 6, 2019).

Describe the bug
After upgrading from 0.24.1 to 0.25.1 I can create a new book (it shows in the books list), but I can't open the book or any old books and pages, just getting a "An unknown error occurred" message. The new book doesn't show in the recent activity stream on the homepage.

The log file has this is for each attempt to view

[2019-02-06 09:41:44] production.ERROR: Type error: Argument 1 passed to BookStack\Services\ViewService::add() must be an instance of BookStack\Entity, instance of BookStack\Entities\Book given, called in /opt/bookstack/BookStack/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 221 {"userId":1,"email":"removed","exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Type error: Argument 1 passed to BookStack\Services\ViewService::add() must be an instance of BookStack\Entity, instance of BookStack\Entities\Book given, called in /opt/bookstack/BookStack/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 221 at /opt/bookstack/BookStack/app/Services/ViewService.php:27)

Full stacktrace here: https://pastebin.com/56W4GnB8

Steps To Reproduce
Steps to reproduce the behavior:
Not been able to test this on a clean 0.24.1 install unfortunately.

  1. Update to 0.25.1 from 0.24.1
  2. Try and view a book or page
  3. See error

Expected behavior
Book or page is shown.

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): 0.25.1
  • PHP Version: PHP 7.1.23-2+020181017082658.9+jessie1.gbpab65a0
  • Hosting Method (Nginx/Apache/Docker): Nginx

Additional context
I can see no issues during the update, log here: https://pastebin.com/8hLFCvfN

Originally created by @markbeazley on GitHub (Feb 6, 2019). **Describe the bug** After upgrading from 0.24.1 to 0.25.1 I can create a new book (it shows in the books list), but I can't open the book or any old books and pages, just getting a "An unknown error occurred" message. The new book doesn't show in the recent activity stream on the homepage. The log file has this is for each attempt to view [2019-02-06 09:41:44] production.ERROR: Type error: Argument 1 passed to BookStack\Services\ViewService::add() must be an instance of BookStack\Entity, instance of BookStack\Entities\Book given, called in /opt/bookstack/BookStack/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 221 {"userId":1,"email":"removed","exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Type error: Argument 1 passed to BookStack\\Services\\ViewService::add() must be an instance of BookStack\\Entity, instance of BookStack\\Entities\\Book given, called in /opt/bookstack/BookStack/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 221 at /opt/bookstack/BookStack/app/Services/ViewService.php:27) Full stacktrace here: https://pastebin.com/56W4GnB8 **Steps To Reproduce** Steps to reproduce the behavior: Not been able to test this on a clean 0.24.1 install unfortunately. 1. Update to 0.25.1 from 0.24.1 2. Try and view a book or page 3. See error **Expected behavior** Book or page is shown. **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): 0.25.1 - PHP Version: PHP 7.1.23-2+0~20181017082658.9+jessie~1.gbpab65a0 - Hosting Method (Nginx/Apache/Docker): Nginx **Additional context** I can see no issues during the update, log here: https://pastebin.com/8hLFCvfN
Author
Owner

@markbeazley commented on GitHub (Feb 6, 2019):

Ok this seems to have been down to the PHP version or something broken with my PHP install that was fixed by updating to the latest version on my system which seems to be PHP 7.1.26-1+020190113101856.12+jessie1.gbp7077bb.

@markbeazley commented on GitHub (Feb 6, 2019): Ok this seems to have been down to the PHP version or something broken with my PHP install that was fixed by updating to the latest version on my system which seems to be PHP 7.1.26-1+0~20190113101856.12+jessie~1.gbp7077bb.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1030