Exception after updating Bookstack. No content anymore #255

Closed
opened 2026-02-04 18:06:26 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @fabianwilflingsederxxxl on GitHub (Feb 1, 2017).

For Bug Reports

  • BookStack Version: BookStack v0.14.1
  • PHP Version: 5.6.29-0+deb8u1
  • MySQL Version: 5.6.29-1~dotdeb+7.1
Expected Behavior

Load a page or a book or a chapter

After updating to the latest version of BookStack, I wanted to test the new features, but if I click at a link to open a chapter, a book, or simply a single page, a error page appear with the given Exception:
ErrorException in EntityRepo.php line 342: Undefined index: BookStack\Chapter:0

Code:
`
in EntityRepo.php line 342
at HandleExceptions->handleError('8', 'Undefined index: BookStack\Chapter:0', '/var/www/BookStack/app/Repos/EntityRepo.php', '342', array('book' => object(Book), 'filterDrafts' => false, 'q' => object(Collection), 'entities' => array(object(Chapter), object(Page), object(Page), object(Page), object(Chapter), object(Page), object(Page), object(Chapter), object(Page), object(Page), object(Page), object(Page), object(Page), object(Page), object(Page)), 'parents' => array('BookStack\Chapter:1' => object(Chapter), 'BookStack\Chapter:4' => object(Chapter), 'BookStack\Chapter:5' => object(Chapter)), 'tree' => array(), 'index' => '14', 'rawEntity' => object(stdClass), 'key' => 'BookStack\Chapter:5', 'entity' => object(Chapter), 'parentKey' => 'BookStack\Chapter:0')) in EntityRepo.php line 342
at EntityRepo->getBookChildren(object(Book)) in ChapterController.php line 73
at ChapterController->show('mybook', 'mychapter')
at call_user_func_array(array(object(ChapterController), 'show'), array('bookSlug' => 'mybook', 'chapterSlug' => 'mychapter')) in compiled.php line 9385
at Controller->callAction('show', array('bookSlug' => 'mybook', 'chapterSlug' => 'mychapter')) in compiled.php line 9412
at ControllerDispatcher->dispatch(object(Route), object(ChapterController), 'show') in compiled.php line 8470
at Route->runController() in compiled.php line 8451
at Route->run(object(Request)) in compiled.php line 8147
at Router->Illuminate\Routing{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request)) in Controller.php line 44
at Controller->BookStack\Http\Controllers{closure}(object(Request), object(Closure)) in compiled.php line 9862
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing{closure}(object(Request)) in Authenticate.php line 45
at Authenticate->handle(object(Request), object(Closure)) in compiled.php line 9870
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing{closure}(object(Request)) in Localization.php line 21
at Localization->handle(object(Request), object(Closure)) in compiled.php line 9870
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing{closure}(object(Request)) in compiled.php line 9978
at SubstituteBindings->handle(object(Request), object(Closure)) in compiled.php line 9870
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing{closure}(object(Request)) in compiled.php line 3151
at VerifyCsrfToken->handle(object(Request), object(Closure)) in compiled.php line 9870
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing{closure}(object(Request)) in compiled.php line 13464
at ShareErrorsFromSession->handle(object(Request), object(Closure)) in compiled.php line 9870
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing{closure}(object(Request)) in compiled.php line 11907
at StartSession->handle(object(Request), object(Closure)) in compiled.php line 9870
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing{closure}(object(Request)) in compiled.php line 13210
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) in compiled.php line 9870
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing{closure}(object(Request)) in compiled.php line 13147
at EncryptCookies->handle(object(Request), object(Closure)) in compiled.php line 9870
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing{closure}(object(Request)) in compiled.php line 9855
at Pipeline->then(object(Closure)) in compiled.php line 8148
at Router->runRouteWithinStack(object(Route), object(Request)) in compiled.php line 8139
at Router->dispatchToRoute(object(Request)) in compiled.php line 8130
at Router->dispatch(object(Request)) in compiled.php line 2472
at Kernel->Illuminate\Foundation\Http{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request)) in Debugbar.php line 51
at Debugbar->handle(object(Request), object(Closure)) in compiled.php line 9870
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing{closure}(object(Request)) in compiled.php line 3213
at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in compiled.php line 9870
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing{closure}(object(Request)) in compiled.php line 9855
at Pipeline->then(object(Closure)) in compiled.php line 2416
at Kernel->sendRequestThroughRouter(object(Request)) in compiled.php line 2400
at Kernel->handle(object(Request)) in index.php line 54

`

Actual Behavior

A error page appears with the content "Whoops, looks like something went wrong"

The links to the books, chapters and pages are shown on the dashboard

Originally created by @fabianwilflingsederxxxl on GitHub (Feb 1, 2017). ### For Bug Reports * BookStack Version: BookStack v0.14.1 * PHP Version: 5.6.29-0+deb8u1 * MySQL Version: 5.6.29-1~dotdeb+7.1 ##### Expected Behavior Load a page or a book or a chapter After updating to the latest version of BookStack, I wanted to test the new features, but if I click at a link to open a chapter, a book, or simply a single page, a error page appear with the given **Exception**: `ErrorException in EntityRepo.php line 342: Undefined index: BookStack\Chapter:0` Code: ` in EntityRepo.php line 342 at HandleExceptions->handleError('8', 'Undefined index: BookStack\Chapter:0', '/var/www/BookStack/app/Repos/EntityRepo.php', '342', array('book' => object(Book), 'filterDrafts' => false, 'q' => object(Collection), 'entities' => array(object(Chapter), object(Page), object(Page), object(Page), object(Chapter), object(Page), object(Page), object(Chapter), object(Page), object(Page), object(Page), object(Page), object(Page), object(Page), object(Page)), 'parents' => array('BookStack\Chapter:1' => object(Chapter), 'BookStack\Chapter:4' => object(Chapter), 'BookStack\Chapter:5' => object(Chapter)), 'tree' => array(), 'index' => '14', 'rawEntity' => object(stdClass), 'key' => 'BookStack\Chapter:5', 'entity' => object(Chapter), 'parentKey' => 'BookStack\Chapter:0')) in EntityRepo.php line 342 at EntityRepo->getBookChildren(object(Book)) in ChapterController.php line 73 at ChapterController->show('mybook', 'mychapter') at call_user_func_array(array(object(ChapterController), 'show'), array('bookSlug' => 'mybook', 'chapterSlug' => 'mychapter')) in compiled.php line 9385 at Controller->callAction('show', array('bookSlug' => 'mybook', 'chapterSlug' => 'mychapter')) in compiled.php line 9412 at ControllerDispatcher->dispatch(object(Route), object(ChapterController), 'show') in compiled.php line 8470 at Route->runController() in compiled.php line 8451 at Route->run(object(Request)) in compiled.php line 8147 at Router->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 53 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Controller.php line 44 at Controller->BookStack\Http\Controllers\{closure}(object(Request), object(Closure)) in compiled.php line 9862 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Authenticate.php line 45 at Authenticate->handle(object(Request), object(Closure)) in compiled.php line 9870 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Localization.php line 21 at Localization->handle(object(Request), object(Closure)) in compiled.php line 9870 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 9978 at SubstituteBindings->handle(object(Request), object(Closure)) in compiled.php line 9870 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 3151 at VerifyCsrfToken->handle(object(Request), object(Closure)) in compiled.php line 9870 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 13464 at ShareErrorsFromSession->handle(object(Request), object(Closure)) in compiled.php line 9870 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 11907 at StartSession->handle(object(Request), object(Closure)) in compiled.php line 9870 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 13210 at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) in compiled.php line 9870 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 13147 at EncryptCookies->handle(object(Request), object(Closure)) in compiled.php line 9870 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 9855 at Pipeline->then(object(Closure)) in compiled.php line 8148 at Router->runRouteWithinStack(object(Route), object(Request)) in compiled.php line 8139 at Router->dispatchToRoute(object(Request)) in compiled.php line 8130 at Router->dispatch(object(Request)) in compiled.php line 2472 at Kernel->Illuminate\Foundation\Http\{closure}(object(Request)) in Pipeline.php line 53 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Debugbar.php line 51 at Debugbar->handle(object(Request), object(Closure)) in compiled.php line 9870 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 3213 at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in compiled.php line 9870 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 9855 at Pipeline->then(object(Closure)) in compiled.php line 2416 at Kernel->sendRequestThroughRouter(object(Request)) in compiled.php line 2400 at Kernel->handle(object(Request)) in index.php line 54 ` ##### Actual Behavior A error page appears with the content "Whoops, looks like something went wrong" The links to the books, chapters and pages are shown on the dashboard
Author
Owner

@ssddanbrown commented on GitHub (Feb 2, 2017):

@fabianwilflingsederxxxl Hi, This looks to be the same issue as #287. I'll get a bugfix release out tonight or tomorrow to cover this.

@ssddanbrown commented on GitHub (Feb 2, 2017): @fabianwilflingsederxxxl Hi, This looks to be the same issue as #287. I'll get a bugfix release out tonight or tomorrow to cover this.
Author
Owner

@fabianwilflingsederxxxl commented on GitHub (Feb 2, 2017):

Hi
Yes that would be very nice.

A big compliment to you for fast support !

@fabianwilflingsederxxxl commented on GitHub (Feb 2, 2017): Hi Yes that would be very nice. A big compliment to you for fast support !
Author
Owner

@ssddanbrown commented on GitHub (Feb 2, 2017):

Hi @fabianwilflingsederxxxl, I could not replicate this issue but I have deployed a new release, v0.14.2, with a hopeful fix. If that does not fix the issue just let me know and I'll re-open this.

@ssddanbrown commented on GitHub (Feb 2, 2017): Hi @fabianwilflingsederxxxl, I could not replicate this issue but I have deployed a new release, v0.14.2, with a hopeful fix. If that does not fix the issue just let me know and I'll re-open this.
Author
Owner

@fabianwilflingsederxxxl commented on GitHub (Feb 2, 2017):

fixed !

@fabianwilflingsederxxxl commented on GitHub (Feb 2, 2017): **fixed** !
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#255