Latest sage9 (master).
On development the assets load fine -
however on production, ‘resource/dist’ is used instead ‘dist/’:
‘/app/themes/the-theme/resources/dist/styles/main.css’.
I also created a new sage project using composer and
overwrote the existing project files and merged back the changes.
I also completely removed and redeployed the site (trellis), but the issue still persists.
How can I further debug this, I tried many things but it still doesn’t work.
I have dev/build path issues a lot with sage 9 and I want to get this finally solved.
1 Like
After some debugging I found out that get_theme_file_uri()
returns in production
’https://www.example.com/app/themes/the-theme/resources/views’ instead just
’https://www.example.com/app/themes/the-theme’.
get_stylesheet_directory_uri()
returns in production
’https://www.example.com/app/themes/the-theme/resources/views’ instead just
’http://www.example.com/app/themes/the-theme/resources’.
This will of course result in incorrect URLs.
Edit: get_stylesheet()
discrepancies:
‘the-theme/resources/views’
‘the-theme/resources’
Edit: Apparently the theme settings were different on production and development, I had to activate the theme under different name on production - now the paths look better.
1 Like
I’ve seen this while updating from Sage9 beta 3 to beta 4. WordPress gets confused and thinks the theme is activated from inside /resources
. Deactivating and re-activating the theme worked for me.
6 Likes