basset: Basset is expecting the wrong path on prod (ubuntu)

Hi folks

a bit of a headscratcher here.

I’ve been using Backpack for years and this is the first time i’m using 6.x.

I have this application locally (mac), where backpack is working and rendering fine.

Just deployed a few hours ago to an Ubuntu vps. Application installs fine, Backpack runs fins as far as functionalities go, but 0m having a problem with assets.

I’m using the CoreUIV4.

Only in production the css for coreUI is not being picked up. The path it is looking for is in the laravel vendor dir

https://[redacted].com/var/www/[redacted].com/vendor/backpack/theme-coreuiv4/resources/assets/css/coreui4.css?3af67d0533b0

while what it needs is perfectly placed in storage/app/public/basset.

Matter of fact locally it is still working as it is needed.

https://local-version.test/storage/basset/vendor/backpack/theme-coreuiv4/resources/assets/css/coreui4.css?0355d650212d

Am I missing something obvious?

Thank you kindly in advance

[Edit]

Forgot to mention that the storage symlink is present and basset:install runs without problems

Screenshot 2023-08-25 at 16 23 04

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Comments: 36 (11 by maintainers)

Most upvoted comments

Indeed, I had to delete the config/theme-coreui4.php and clear all the cache, now everything is working fine. Thanks for the advice !

I apologise for the delay.

@tabacitu i saw that it was merged, updated, nuked all the basset caches/configs. Nada. And then i removed the local theme-coreui4.php file i had published in my config. Worked like a charm, already in the prod server.

@Astriel remove any specific theme config you might have like config/theme-coreui4.php, clear basset and cache again. Should work with no issues

@Astriel indeed. That’s the same problem i got. For the time being, so i can continue work, i’ve set the theme to CoreUI2. That seems to work.

Pinging @tabacitu and @promatik 🙏

Hey! Sorry for coming late to the party, I’ll just support tabacitu comment, by saying that my guess is also to a miss configuration of the public disk, so changing it to basset should work.

I’m guessing this is an old project being upgraded, and the url is not correctly set on the public disk.

By the way @sidis405, to change the disk, add BASSET_DISK=basset to the .env file 👌

Yep i do. Here’s what’s in it

{
    "https://github.com/adobe-fonts/source-sans/releases/download/3.046R/WOFF2-source-sans-3.046R.zip": "/1",
    "https://github.com/tinymce/tinymce-dist/archive/refs/tags/6.3.2.tar.gz": "/1",
    "vendor/backpack/crud/src/resources/assets/css/common.css": "/vendor/backpack/crud/src/resources/assets/css/common.css",
    "vendor/backpack/crud/src/resources/assets/img/spinner.svg": "/vendor/backpack/crud/src/resources/assets/img/spinner.svg",
    "vendor/backpack/crud/src/resources/assets/js/common.js": "/vendor/backpack/crud/src/resources/assets/js/common.js",
    "vendor/backpack/crud/src/resources/assets/libs/jquery.mjs.nestedSortable2.js": "/vendor/backpack/crud/src/resources/assets/libs/jquery.mjs.nestedSortable2.js",
    "vendor/backpack/pro/resources/assets/js/icon-picker.js": "/vendor/backpack/pro/resources/assets/js/icon-picker.js",
    "vendor/backpack/theme-coreuiv2/resources/assets/css/coreuiv2.css": "/vendor/backpack/theme-coreuiv2/resources/assets/css/coreuiv2.css",
    "vendor/backpack/theme-coreuiv4/resources/assets/css/coreui4.css": "/vendor/backpack/theme-coreuiv4/resources/assets/css/coreui4.css",
    "vendor/backpack/theme-tabler/resources/assets/css/style.css": "/vendor/backpack/theme-tabler/resources/assets/css/style.css",
    "vendor/backpack/theme-tabler/resources/assets/js/tabler.js": "/vendor/backpack/theme-tabler/resources/assets/js/tabler.js"
}

but this is identical to my local setup.

So i guess these key-value pairs get interpreted and used as a map. The question now becomes in a case like

"vendor/backpack/crud/src/resources/assets/css/common.css": "/vendor/backpack/crud/src/resources/assets/css/common.css"

how does it once get correctly translated to storage/basset/vendor/backpack/crud/src/resources/assets/css/common.css and then another times stay vendor/backpack/crud/src/resources/assets/css/common.css?