[Support Request]: #2524

Closed
opened 2026-02-05 04:24:47 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @theking1141 on GitHub (Dec 11, 2021).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

After the update, a blank page began to open for me. I found instructions from the link: https://www.bookstackapp.com/docs/admin/debugging/.

The instruction did not work for me after that in the env file I added "APP_DEBUG = true" and the errors indicated below went.
Also, during the update, when I tried to enter the command: "php artisan view: clear", an error occurred:

Symfony\Component\Debug\Exception\FatalThrowableError  : Call to undefined method Illuminate\Pagination\Paginator::useBootstrap()

  at /var/www/bookstack/app/Providers/AppServiceProvider.php:66
    62|         // View Composers
    63|         View::composer('entities.breadcrumbs', BreadcrumbsViewComposer::class);
    64| 
    65|         // Set paginator to use bootstrap-style pagination
  > 66|         Paginator::useBootstrap();
    67|     }
    68| 
    69|     /**
    70|      * Register any application services.

  Exception trace:

  1   BookStack\Providers\AppServiceProvider::boot()
      /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36

  2   Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
      /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Container/Util.php:37

  Please use the argument -v to see more details.

P.S. If you do not go into debug mode, but post the html-code that is contained in the body of an empty page, we will see this:

<!DOCTYPE html>
<html lang=""
      dir="ltr"
      class="

Exact BookStack Version

21.11.2

Log Content

Error
Symfony\Component\Debug\Exception\FatalThrowableError
Call to undefined method Illuminate\Pagination\Paginator::useBootstrap()

Environment
PHP Version: 8.0.13
BookStack Version: v21.11.2
Theme Configured:

Stack Trace
#0 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): BookStack\Providers\AppServiceProvider->boot()
#1 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Container/Util.php(37): Illuminate\Container\BoundMethod::Illuminate\Container{closure}()
#2 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#3 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod()
#4 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Container/Container.php(590): Illuminate\Container\BoundMethod::call()
#5 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(856): Illuminate\Container\Container->call()
#6 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(839): Illuminate\Foundation\Application->bootProvider()
#7 [internal function]: Illuminate\Foundation\Application->Illuminate\Foundation{closure}()
#8 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(840): array_walk()
#9 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php(17): Illuminate\Foundation\Application->boot()
#10 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(219): Illuminate\Foundation\Bootstrap\BootProviders->bootstrap()
#11 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(156): Illuminate\Foundation\Application->bootstrapWith()
#12 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(140): Illuminate\Foundation\Http\Kernel->bootstrap()
#13 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(110): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
#14 /var/www/bookstack/public/index.php(53): Illuminate\Foundation\Http\Kernel->handle()
#15 {main}

PHP Version

8

Hosting Environment

Ubuntu 20.04, The application is installed using the sh-script posted on your website

Originally created by @theking1141 on GitHub (Dec 11, 2021). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario After the update, a blank page began to open for me. I found instructions from the link: https://www.bookstackapp.com/docs/admin/debugging/. The instruction did not work for me after that in the env file I added "**APP_DEBUG = true**" and the errors indicated below went. Also, during the update, when I tried to enter the command: "**php artisan view: clear"**, an error occurred: ``` Symfony\Component\Debug\Exception\FatalThrowableError : Call to undefined method Illuminate\Pagination\Paginator::useBootstrap() at /var/www/bookstack/app/Providers/AppServiceProvider.php:66 62| // View Composers 63| View::composer('entities.breadcrumbs', BreadcrumbsViewComposer::class); 64| 65| // Set paginator to use bootstrap-style pagination > 66| Paginator::useBootstrap(); 67| } 68| 69| /** 70| * Register any application services. Exception trace: 1 BookStack\Providers\AppServiceProvider::boot() /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36 2 Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Container/Util.php:37 Please use the argument -v to see more details. ``` P.S. If you do not go into debug mode, but post the html-code that is contained in the body of an empty page, we will see this: ``` <!DOCTYPE html> <html lang="" dir="ltr" class=" ``` ### Exact BookStack Version 21.11.2 ### Log Content Error Symfony\Component\Debug\Exception\FatalThrowableError Call to undefined method Illuminate\Pagination\Paginator::useBootstrap() Environment PHP Version: 8.0.13 BookStack Version: v21.11.2 Theme Configured: Stack Trace #0 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): BookStack\Providers\AppServiceProvider->boot() #1 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Container/Util.php(37): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() #2 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure() #3 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod() #4 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Container/Container.php(590): Illuminate\Container\BoundMethod::call() #5 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(856): Illuminate\Container\Container->call() #6 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(839): Illuminate\Foundation\Application->bootProvider() #7 [internal function]: Illuminate\Foundation\Application->Illuminate\Foundation\{closure}() #8 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(840): array_walk() #9 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php(17): Illuminate\Foundation\Application->boot() #10 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(219): Illuminate\Foundation\Bootstrap\BootProviders->bootstrap() #11 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(156): Illuminate\Foundation\Application->bootstrapWith() #12 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(140): Illuminate\Foundation\Http\Kernel->bootstrap() #13 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(110): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter() #14 /var/www/bookstack/public/index.php(53): Illuminate\Foundation\Http\Kernel->handle() #15 {main} ### PHP Version 8 ### Hosting Environment Ubuntu 20.04, The application is installed using the sh-script posted on your website
OVERLORD added the 🐕 Support label 2026-02-05 04:24:47 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Dec 11, 2021):

Hi @theking1141,

  • Could you confirm your composer version (composer -V)?
  • Have you attempted to upgrade PHP at some point?
  • Do any errors occur on the composer install --no-dev part of the upgrade command?
@ssddanbrown commented on GitHub (Dec 11, 2021): Hi @theking1141, - Could you confirm your composer version (`composer -V`)? - Have you attempted to upgrade PHP at some point? - Do any errors occur on the `composer install --no-dev` part of the upgrade command?
Author
Owner

@theking1141 commented on GitHub (Dec 11, 2021):

Hi @ssddanbrown,

My answers:

  • Composer 1.10.1 2020-03-13 20:34:27
  • Only with the command: apt-get update -y && apt-get upgrade
  • Composer could not find a composer.json file in /root
    To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section

Hi @theking1141,

  • Could you confirm your composer version (composer -V)?
  • Have you attempted to upgrade PHP at some point?
  • Do any errors occur on the composer install --no-dev part of the upgrade command?
@theking1141 commented on GitHub (Dec 11, 2021): Hi @ssddanbrown, My answers: - Composer 1.10.1 2020-03-13 20:34:27 - Only with the command: **apt-get update -y && apt-get upgrade** - Composer could not find a composer.json file in /root To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section > Hi @theking1141, > > * Could you confirm your composer version (`composer -V`)? > * Have you attempted to upgrade PHP at some point? > * Do any errors occur on the `composer install --no-dev` part of the upgrade command?
Author
Owner

@ssddanbrown commented on GitHub (Dec 11, 2021):

@theking1141 Thanks for providing those.

I think you must have ran some extra commands to install PHP8 at some point. It's not part of the BookStack installation script and it's not part of the default Ubuntu repositories either as far as I'm aware.

The composer install --no-dev part of the upgrade command needs to be ran within the BookStack installation folder. Commonly at /var/www/bookstack.

The version of composer is quite old, I'm assuming that may be an apt-installed version? If so I'd reccommend removing the existing version of composer (apt remove composer) and instead download a fresh version as per the composer instructions:
https://getcomposer.org/download/
Worth doing the global install command shown on that page (sudo mv composer.phar /usr/local/bin/composer).

@ssddanbrown commented on GitHub (Dec 11, 2021): @theking1141 Thanks for providing those. I think you must have ran some extra commands to install PHP8 at some point. It's not part of the BookStack installation script and it's not part of the default Ubuntu repositories either as far as I'm aware. The `composer install --no-dev` part of the upgrade command needs to be ran within the BookStack installation folder. Commonly at `/var/www/bookstack`. The version of composer is quite old, I'm assuming that may be an apt-installed version? If so I'd reccommend removing the existing version of composer (`apt remove composer`) and instead download a fresh version as per the composer instructions: https://getcomposer.org/download/ Worth doing the global install command shown on that page (`sudo mv composer.phar /usr/local/bin/composer`).
Author
Owner

@theking1141 commented on GitHub (Dec 12, 2021):

You were right! PHP8 is installed on the system. And now I figured out why it happened. In the article https://www.bookstackapp.com/docs/admin/updates/, if you scroll to the Updating to v21.04 or higher section, there is an instruction for updating PHP to version 8, but I did not see that it was for Ubuntu 18.04.

The composer update helped me. Thanks a lot! My problem is solved!

@theking1141 commented on GitHub (Dec 12, 2021): You were right! PHP8 is installed on the system. And now I figured out why it happened. In the article https://www.bookstackapp.com/docs/admin/updates/, if you scroll to the **Updating to v21.04 or higher** section, there is an instruction for updating PHP to version 8, but I did not see that it was for Ubuntu 18.04. The composer update helped me. Thanks a lot! My problem is solved!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2524