Skip to content

Custom theme is not being used. #3592

@sfinktah

Description

@sfinktah
PHP Version: (PHP v7.4.24)
Operating System and Version: Ubuntu 20.04.3 LTS
Reproduction Repository: n/a
Browser type and version: User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36
Nova Version: "3.29.0"
Laravel Version: '8.64.0';
Database Driver & Version: mysqladmin  Ver 8.0.26-0ubuntu0.20.04.3 for Linux on x86_64 ((Ubuntu))

Description:

Nova theme fails to ... well, do anything at all really.

Detailed steps to reproduce the issue on a fresh Nova installation:

php artisan nova:theme example/farmhand_one

# edit theme with some easily to ack stuff:
nova-components/FarmhandOne/resources/css/theme.css:
      .bg-grad-sidebar {
        background-image: -webkit-gradient(
          linear,
          left bottom,
          left top,
          from(#ff0000), 
          to (#00ff00)
        );


# manually add to config/app.php
'providers' = [  
        // ...
        Example\FarmhandOne\ThemeServiceProvider::class,

# publish theme
php artisan vendor:publish

# paranoid rebuild
php artisan clear-compiled   
php artisan cache:clear      
npm install && npm run dev
php artisan view:clear       
php artisan view:cache

# ack for inclusion of theme in mix.js cache files
ack '#ff0000'

      nova-components/FarmhandOne/resources/css/theme.css
      17:    from(#ff0000),
      
      public/example/farmhand_one/theme.css
      19:    from(#ff0000),

Theme does not appear to take effect (or even be mentioned) in browser (cache disabled).

Further check of filesystem for files created:

find . | grep -i farmhand

        ./nova-components/FarmhandOne
        ./nova-components/FarmhandOne/src
        ./nova-components/FarmhandOne/src/ThemeServiceProvider.php
        ./nova-components/FarmhandOne/composer.json
        ./nova-components/FarmhandOne/resources
        ./nova-components/FarmhandOne/resources/css
        ./nova-components/FarmhandOne/resources/css/theme.css
        ./public/example/farmhand_one
        ./public/example/farmhand_one/theme.css
        ./vendor/example/farmhand_one

find . -name 'theme.css'

        ./nova-components/FarmhandOne/resources/css/theme.css
        ./public/example/farmhand_one/theme.css
        ./nova/src/Console/theme-stubs/resources/css/theme.css

artisan vendor:publish --force has also been tried.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions