After activating Sage Theme: Fatal error: Uncaught Error: Call to a member function boot() on null in functions.php:43

Following the documentation.

I am getting the following error after activating the Sage theme on a fresh Trellis install.

Any ideas? I tried searching, and found someone suggesting to change how the bootloader was called. I did that – and then got an issue with "Class “Termwind/Laravel/TermwindServiceProvider” not found… so I reverted that functions.php change.

I’m also using roots/acorn v2.

Fatal error: Uncaught Error: Call to a member function boot() on null in /srv/www/development.btraill.test/current/web/app/themes/sage/functions.php:43 Stack trace: #0 /srv/www/development.btraill.test/current/web/wp/wp-settings.php(611): include() #1 /srv/www/development.btraill.test/current/web/wp-config.php(9): require_once('/srv/www/develo...') #2 /srv/www/development.btraill.test/current/web/wp/wp-load.php(55): require_once('/srv/www/develo...') #3 /srv/www/development.btraill.test/current/web/wp/wp-admin/admin.php(34): require_once('/srv/www/develo...') #4 /srv/www/development.btraill.test/current/web/wp/wp-admin/customize.php(13): require_once('/srv/www/develo...') #5 {main} thrown in /srv/www/development.btraill.test/current/web/app/themes/sage/functions.php on line 43 

What steps did you take?

Is it a fresh Sage install?

This is an extremely outdated version of Acorn at this point

@ben Apologies - should have added this to the original post. Was hoping someone may have run into the same issue recently. I’m sure I am doing something wrong as it’s a fresh sage theme install aswell.

Steps taken (within vagrant environment):

  • volta install node
  • npm install --global yarn
  • composer require roots/acorn
  • composer create-project roots/sage sage (within themes directory)
  • composer install && update for good measure/to ensure all dependencies are installed
  • yarn && yarn build

I am now questioning my bud.config.js – I am perhaps misunderstanding setURL/setProxyURL:

.setUrl('http://development.btraill.test')
.setProxyUrl('http://development.btraill.test')

Many thanks for taking the time to assist.

Is there a reason why you’ve installed Acorn v2? You should be able to get up and running with the latest version of Acorn

1 Like

I downgraded because I read a thread from last year on a forum, where a user said there was “an issue with v3,” (their error was the same) and they also suggested to change how the bootloader was being called. I reverted that functions.php change.

Neither suggestions got me any further really. One did allow the symphony debug framework to now load (as opposed to the straight fatal error), but then presented an exception + stack trace about locating the Termwind Service Provider.

I will revert back to the latest Acorn version and see if that does anything.

It’s a miracle… I removed the existing Acorn version, replaced it with 4.1, and it now works.

Very odd… I must have somehow ‘debugged’ the actual issue whilst using the outdated version of Acorn. (I rebuilt/configured trellis in the process lol)

I appreciate your help!

Lesson learned: Don’t take random, dated advice from someone outside of roots.io. :rofl: