Exception after updating Bookstack. No content anymore #294

Closed
opened 2017-02-01 21:21:46 +01:00 by fabianwilflingsederxxxl · 4 comments
fabianwilflingsederxxxl commented 2017-02-01 21:21:46 +01:00 (Migrated from github.com)

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

### 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
ssddanbrown commented 2017-02-01 22:15:20 +01:00 (Migrated from github.com)

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

@fabianwilflingsederxxxl Hi, This looks to be the same issue as #287. I'll get a bugfix release out tonight or tomorrow to cover this.
fabianwilflingsederxxxl commented 2017-02-01 22:25:39 +01:00 (Migrated from github.com)

Hi
Yes that would be very nice.

A big compliment to you for fast support !

Hi Yes that would be very nice. A big compliment to you for fast support !
ssddanbrown commented 2017-02-01 23:35:49 +01:00 (Migrated from github.com)

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.

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.
fabianwilflingsederxxxl commented 2017-02-02 15:54:00 +01:00 (Migrated from github.com)

fixed !

**fixed** !
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bookstack/bookstack#294
No description provided.