I’m trying to build my first project with sage (10), I’m running a local xampp server on windows 10 the PHP version of xampp is 8.1.6. When I try to activate the theme after installing Acorn, I get the following fatal error:
Fatal error: Uncaught Error: Call to a member function boot() on null in .../functions.php on line *43*
I tried a fresh installation of Sage 10 (with Bedrock) and I got the same error, using PHP 8.2.11. I’m also using Windows 10, but my project is running on WSL Ubuntu.
What do you mean by “uploading acorn as a plugin”? I installed Acorn with composer at the WordPress level. Do I need to install it on the Sage theme folder?
Hi @jerasokcm, my solution was to download acorn as a plugin (uninstall your current version first) from GitHub - roots/acorn: Laravel components for WordPress plugins and themes and upload it to your plugins folder (mu-plugins is probably better, but didn’t do that). Activate the plugin and it should give you a different error. This is due to the version of Acorn plugin being 2, so you need to change the bootloader function call in functions.php. Hope this works for you!
@jerasokcm Acorn should be installed at the theme directory, maybe thats why its not working. I also switched to wsl and it works fine following the documentation
To avoid confusion, I just want to add that it’s not quite true that Acorn should be installed at the theme directory. Acorn can be installed in the theme directory, but if using Bedrock, you probably want it installed at the project level to avoid conflicts with other dependencies.