Error on "empty recycle bin" #2072

Closed
opened 2026-02-05 02:48:55 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @loki-core on GitHub (Feb 3, 2021).

Describe the bug
It is not possible to empty the trash in the admin area.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Delete a page, a book or a shelf
  2. Go to Settings -> Maintenance -> Open Recycle bin
  3. Click on empty recycle bin or remove an item in the list

Screenshots
If applicable, add screenshots to help explain your problem.
image

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings):BookStack v0.31.5
  • Hosting Method (Nginx/Apache/Docker): Docker

Additional context
Log:
[2021-02-01 21:10:49] production.ERROR: Return value of BookStack\Entities\Tools\TrashCan::destroyEntity() must be of the type int, none returned {"userId":1,"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Return value of BookStack\\Entities\\Tools\\TrashCan::destroyEntity() must be of the type int, none returned at /var/www/html/app/Entities/Tools/TrashCan.php:304) #19 /var/www/html/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(BookStack\\Http\\Request)) #20 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(BookStack\\Http\\Request), Object(Closure)) [2021-02-01 21:11:08] production.ERROR: Return value of BookStack\Entities\Tools\TrashCan::destroyEntity() must be of the type int, none returned {"userId":1,"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Return value of BookStack\\Entities\\Tools\\TrashCan::destroyEntity() must be of the type int, none returned at /var/www/html/app/Entities/Tools/TrashCan.php:304) #18 /var/www/html/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(BookStack\\Http\\Request)) #19 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(BookStack\\Http\\Request), Object(Closure)) [2021-02-01 21:11:57] production.ERROR: Return value of BookStack\Entities\Tools\TrashCan::destroyEntity() must be of the type int, none returned {"userId":1,"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Return value of BookStack\\Entities\\Tools\\TrashCan::destroyEntity() must be of the type int, none returned at /var/www/html/app/Entities/Tools/TrashCan.php:304)

Originally created by @loki-core on GitHub (Feb 3, 2021). **Describe the bug** It is not possible to empty the trash in the admin area. **Steps To Reproduce** Steps to reproduce the behavior: 1. Delete a page, a book or a shelf 2. Go to Settings -> Maintenance -> Open Recycle bin 3. Click on empty recycle bin or remove an item in the list **Screenshots** If applicable, add screenshots to help explain your problem. ![image](https://user-images.githubusercontent.com/54707308/106763723-6ba2d500-6637-11eb-8efa-26881344305c.png) **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings):BookStack v0.31.5 - Hosting Method (Nginx/Apache/Docker): Docker **Additional context** Log: `[2021-02-01 21:10:49] production.ERROR: Return value of BookStack\Entities\Tools\TrashCan::destroyEntity() must be of the type int, none returned {"userId":1,"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Return value of BookStack\\Entities\\Tools\\TrashCan::destroyEntity() must be of the type int, none returned at /var/www/html/app/Entities/Tools/TrashCan.php:304) #19 /var/www/html/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(BookStack\\Http\\Request)) #20 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(BookStack\\Http\\Request), Object(Closure)) [2021-02-01 21:11:08] production.ERROR: Return value of BookStack\Entities\Tools\TrashCan::destroyEntity() must be of the type int, none returned {"userId":1,"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Return value of BookStack\\Entities\\Tools\\TrashCan::destroyEntity() must be of the type int, none returned at /var/www/html/app/Entities/Tools/TrashCan.php:304) #18 /var/www/html/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(BookStack\\Http\\Request)) #19 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(BookStack\\Http\\Request), Object(Closure)) [2021-02-01 21:11:57] production.ERROR: Return value of BookStack\Entities\Tools\TrashCan::destroyEntity() must be of the type int, none returned {"userId":1,"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Return value of BookStack\\Entities\\Tools\\TrashCan::destroyEntity() must be of the type int, none returned at /var/www/html/app/Entities/Tools/TrashCan.php:304) `
OVERLORD added the 🐛 Bug🚀 Priority🏭 Back-End labels 2026-02-05 02:48:55 +03:00
Author
Owner

@loki-core commented on GitHub (Feb 3, 2021):

Possible pull request https://github.com/BookStackApp/BookStack/pull/2530

@loki-core commented on GitHub (Feb 3, 2021): Possible pull request https://github.com/BookStackApp/BookStack/pull/2530
Author
Owner

@ssddanbrown commented on GitHub (Feb 6, 2021):

Thanks for reporting @loki-core, This has been addressed and covered with testing within cc5d0ef4cf, 7843d8f054 & 61a911dd39 and will be part of the next patch release due within the next day or so.

@ssddanbrown commented on GitHub (Feb 6, 2021): Thanks for reporting @loki-core, This has been addressed and covered with testing within cc5d0ef4cf899650e64b4d6f1adbec7beb96c369, 7843d8f05427ec80fbac8933072cb2b9bfbc4905 & 61a911dd39f71c914abe407705f690b33cf7cf08 and will be part of the next patch release due within the next day or so.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2072