Bug: Page template dropdown disappeared after upgrading to Acorn v3.x
See original GitHub issueTerms
- I have read the guidelines for Contributing to Roots Projects
- This request is not a duplicate of an existing issue
- I have read the docs and followed them (if applicable)
- I have seached the Roots Discourse for answers and followed them (if applicable)
- This is not a personal support request that should be posted on the Roots Discourse community
Description
What’s wrong?
After upgrading Acorn to the 3.0.0-alpha.3
version (but it also happens on alpha.1 & alpha.2), the Template dropdown in the Page attributes metabox has completely disappeared somehow.
When viewing my template sin the frontend I get a Target class [sage.view] does not exist.
error?
What have you tried?
- I tried installing all 3.0.0-alpha versions and running all of these commands afterwards:
wp acorn acorn:init
wp acorn package:discover
wp acorn vendor:publish
wp acorn config:clear
wp acorn optimize:clear
wp acorn optimize
wp acorn view:cache
All without errors and I can also see my log1x/acf-composer
fields & log1x/poet
types in the backend.
- I disabled all of my plugins.
- I disabled all of my wordpress actions/filters in my theme.
What insights have you gained?
I think Acorn possible is not recognising my template files inside the resources/views
folder even though get_theme_file_path('/resources/views')
is returning the correct path?
Possible solutions
Downgrading to Acorn 2.1, but then I’m bumping into this bug again.
Temporary workarounds
Switch to a default Wordpress theme
Steps To Reproduce
- Install roots/acorn 3.0.0-alpha.3 with composer in your Bedrock folder:
composer require roots/acorn:3.0.0-alpha.3
- Call the bootloader in your functions.php:
\Roots\bootloader()->boot();
- Go to an edit page in your Wordpress backend and have a look at the Page attributes box in the right sidebar.
- Switch to a default Wordpress theme and repeat step 3.
Expected Behavior
The Page attributes box in the right sidebar should have a Template dropdown.
Actual Behavior
The Page attributes box in the right sidebar does not have a Template dropdown anymore.
Relevant Log Output
No php errors whatsoever
Versions
Acorn 3.0.0-alpha.3 PHP 8.0.22 Composer version 2.4.1
Issue Analytics
- State:
- Created a year ago
- Comments:8 (4 by maintainers)
I had the same
Target class [sage.view] does not exist.
error. I forgot to call the parent’sregister()
/boot()
methods.Here is my working
ThemeServiceProvider
:Yeah I did notice that, but only if you have enabled Gutenberg, which I haven’t for this theme.