roots / sage

WordPress starter theme with Laravel Blade components and templates, Tailwind CSS, and a modern development workflow
https://roots.io/sage/
MIT License
12.71k stars 3.06k forks source link

Bug: Sage 10.5 keeps reporting Acorn not available #3119

Closed Bozzified closed 1 year ago

Bozzified commented 1 year ago

Terms

Description

What's wrong?

After fresh install of Sage 10.5 and activating the theme the message "Acorn is not installed" appears.

What have you tried?

Local machine: PHP v8.1.14 Trellis v1.9.0 Bedrock v1.21.1

Clean bedrock install with Trellis CLI 1.9.0, set-up standard trellis config for dev and vagrant, vagrant works fine, wordpress is up. Install Acorn 3.0 in /site/composer.json requirements. Installs 3.0. Added post-autoload-dump with Roots\Acorn\ComposerScripts::postAutoloadDump. Standard theme works fine.

Run fresh install of Sage 10.5 with composer create-project roots/sage . Avoided custom naming of the theme to avoid any possible mispellings so the theme has name "sage".

Modify bud config, build theme, build assets. All working good. Switch to Sage theme in Wordpress, the error appears and WP dash not accessible anymore as well.

What insights have you gained?

functions.php seemingly cannot find \Roots\bootloader() and goes directly to wp_die.

Possible solutions

Not that I could fine after hours of messing around. Tried clearing caches, composer autodump.. nothing works.

Temporary workarounds

Went back to Acorn 2.1.2 and Sage 10.4.1, same steps, works flawlessly, no errors.

Steps To Reproduce

  1. Trellis CLI install of Bedrock (1.9.0)
  2. Configure Vagrant and Group_Roles
  3. Install Acorn 3.0
  4. Install Sage 10.5
  5. Set up Bud config, run yarn, run yarn build
  6. Activate Sage theme inside wordpress
  7. Error appears.

Expected Behavior

Just like it works with Acorn 2.1.2 and Sage 10.4.1. Same steps and theme is shown.

Actual Behavior

Normal install as with 2.1.2 and Sage 10.4.1. WP runs fine on initial install and default theme. Acorn 3.0 installs fine with composer, no errors. Breaks and shows Acorn not installed as soon as the Sage 10.5 theme is activated.

Relevant Log Output

Theme requires Acorn to be installed.

Same message appears when ssh-ed into vagrant and trying to run wp acorn optimize. Error: Acorn is not installed.

Versions

OSX Monterey, Python 3.10.4, Ansible 2.10.16, Trellis CLI 1.9.0, Bedrock 1.21.1, PHP 8.1.14

retlehs commented 1 year ago

Unable to reproduce this issue with Sage 10.5 with Acorn v3 installed in both of the following scenarios:

Steps followed:

kellymears commented 1 year ago

@Bozzified can you try wiping the acorn cache (by default: web/app/cache/acorn)?

Bozzified commented 1 year ago

@kellymears done it.. a few times. No go. On clean install with trellis cli, no matter what I do the Sage 10.5. theme keeps saying Acorn not installed when activated. Went back to Acorn 2.1.2 and Sage 10.4.1 .. same setup, same installation, works flawlessly. I'll have to look into this some other time. Thanks for the suggestion though.

Bozzified commented 1 year ago

I have identified when the issue happens.

Older box that was previously recommended for use with Apple Sillicon and Parallels causes the issue highlighted in this ticket vagrant_box: 'jeffnoxon/ubuntu-20.04-arm64'

the new trellis setup with default box in vagrant.default.yml works just fine on Apple Sillicon and Parallels and Sage 10.5 and Acorn 3.0 work perfectly.

vagrant_box: 'bento/ubuntu-20.04' vagrant_box_version: '>= 0' vagrant_box_auto_arch: true

Just in case someone has the same issue and is using the older box.