I’ve not used sage since v9. On the quest to make a new version of an existing theme into a super light, low carbon, website theme, I wanted to come back to sage and test it a little with the CSS frameworks available - and see how that stacks up against some other possible starting points. I loved how easy it was with sage9 to contextualise theme parts and I’m sure that would also help me make the theme lighter.
I’ve managed to install the theme ok but when I activate it I get the following error:
In the docs the acorn install seems to be dependent mainly on having bedrock - which I’ve chosen not to have on this install. Makes me wonder if bedrock is now a prerequisite for Sage theme?
I chose the option of using the plugin version of Acorn which is installed and activated on the test site as this is the only one which seems to be possible without bedrock.
Can anyone help with this error? Need to be able to get a version up and running to see if it’s an option for my next project.
I have used the Acorn plugin installed and activated in the main plugins folder. This is not set up as Bedrock.
I’m using LocalWP, PHP 8.0.16, Ngix.
Im not sure what you mean about installing Acorn in the theme, can’t see any step around this in the installation documentation Installation | Sage Docs | Roots
If not installing it as a plugin, you can install acorn with composer. Actually it’s recommended to install it with composer (bedrock or sage), and that’s what is officially supported. So, it kind of is a requirement, kind of not. I have had it working fine through a plugin though.
Have you made any edits to sage?
Were things working at any point and now it is not or have you not gotten things working yet?
This illuminate error can show up for lots of reasons.
@meemal My apologies about the state of the installation docs, they need some improvements. I’m going to update them this week to be less confusing.
Can you try removing Acorn as a plugin and instead run composer require roots/acorn from your theme directory?
While we prefer folks to use Bedrock (or something like it) and install Acorn as a dependency at the top level of your site, it’s still possible and supported to install Acorn from within the Sage theme
AH, so the way it was worded in the installation help for Acorn made me think it only worked with Bedrock. Thanks for the clarification @erit and @ben. Great the documentation is in progress! Is there an ETA on the book also?
I have removed the Acorn plugin.
So now in my theme folder have tried to install it with composer but again get a message about
naomispirit@Naomis-MacBook-Pro dbd-v3 % composer require roots/acorn
Info from https://repo.packagist.org: #StandWithUkraine
Using version ^2.1 for roots/acorn
./composer.json has been updated
Running composer update roots/acorn
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- roots/acorn[v2.1.0, ..., v2.1.2] require illuminate/config ^8.70 -> found illuminate/config[v8.70.0, ..., v8.83.27] but the package is fixed to v5.6.39 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- Root composer.json requires roots/acorn ^2.1 -> satisfiable by roots/acorn[v2.1.0, v2.1.1, v2.1.2].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
So took the advice to try with the install dependencies flag and get some more issues
naomispirit@Naomis-MacBook-Pro dbd-v3 % composer require roots/acorn -w
Info from https://repo.packagist.org: #StandWithUkraine
Using version ^2.1 for roots/acorn
./composer.json has been updated
Running composer update roots/acorn --with-dependencies
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Dependency "illuminate/support" is also a root requirement. Package has not been listed as an update argument, so keeping locked at old version. Use --with-all-dependencies (-W) to include root dependencies.
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- roots/acorn[v2.1.0, ..., v2.1.2] require illuminate/support ^8.70 -> found illuminate/support[v8.70.0, ..., v8.83.27] but it conflicts with your root composer.json require (5.6.*).
- Root composer.json requires roots/acorn ^2.1 -> satisfiable by roots/acorn[v2.1.0, v2.1.1, v2.1.2].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Hello, tried a fresh install with no other theme and you’re right it worked. So then on my existing example I removed the sage 9 theme example I had and now the site loads!
I thought that each theme was an isolated environment - I didn’t realise another theme at the same level could interfere.
I’ve used PHP 8.0 and getting one error still
Deprecated: Method ReflectionParameter::getClass() is deprecated in /Users/naomispirit/Local Sites/dunnet-bay-distillers/app/public/wp-content/themes/dbd-v3/vendor/illuminate/container/Container.php on line *826*
That error sounds like an outdated illuminate/container package. What roots/acorn version and illuminate/container version do you have in your lock file?