Laravel-Backpack / basset

Better asset helpers for Laravel apps.
MIT License
151 stars 10 forks source link

What is the reason some files from CDN are not imported? #93

Closed realtebo closed 10 months ago

realtebo commented 10 months ago

Theme: tabler with backpack 6

image

Why we still have so many unpkg? should not be all downloaded from basset?

karandatwani92 commented 10 months ago

Hey @realtebo Please update the tabler theme. The latest version of the tabler-theme doesn't have this issue which we can verify from the demo:

Screenshot 2023-09-01 at 1 11 51 PM

In case you published views to customize, check in resources/views/vendor/backpack/theme-tabler.

pxpm commented 10 months ago

Hey @realtebo it's also worth to check if you have basset enabled.

Vendor files and non-public assets are always internalized to be served, even if you have basset disabled, otherwise they wouldn't work.

The url assets are not internalized if basset is disabled. If not, everything should be internalized.

Cheers

realtebo commented 10 months ago

Thanks, but we have same problem with a fresh install on a clean project.

Anyway we'll try. I'll tell you in a few day due to my holidays

How to upgrade tabler? I hoped it will be upgraded when upgrading backpack

[please document it]

We have nothing published and only 1-2 small blades ovverriden [buttons and filters]

Mirko-Tebaldi commented 10 months ago

Sorry, but same bug with latest version !

λ php artisan backpack:version                                                             
### PHP VERSION:                                                                           
PHP 8.2.8 (cli) (built: Jul  4 2023 15:53:15) (ZTS Visual C++ 2019 x64)                    
Copyright (c) The PHP Group                                                                
Zend Engine v4.2.8, Copyright (c) Zend Technologies                                        

### LARAVEL VERSION:                                                                       
10.21.0.0                                                                                  

### BACKPACK PACKAGE VERSIONS:                                                             
backpack/basset: 1.2.0                                                                     
backpack/crud: 6.2.0                                                                       
backpack/generators: v4.0.2                                                                
backpack/permissionmanager: 7.0.1                                                          
backpack/pro: 2.0.11                                                                       
backpack/theme-tabler: 1.1.0                                                               
Mirko-Tebaldi commented 10 months ago

We tried also to remove vendor folder at all Do a fresh composer install Remove \public\storage simlink Remove \storage\app\public\basset folder Did a opt:clear and a basset:clear

Anyway, analyzing html source we can find a list of not-local assets.

image

pxpm commented 10 months ago

Thanks, but we have same problem with a fresh install on a clean project.

Anyway we'll try. I'll tell you in a few day due to my holidays

How to upgrade tabler? I hoped it will be upgraded when upgrading backpack

[please document it]

We have nothing published and only 1-2 small blades ovverriden [buttons and filters]

Check you .env file. The basset is automatically disabled in local https://github.com/Laravel-Backpack/basset#installation

Mirko-Tebaldi commented 10 months ago

How can be disabled if there are rows like this?

<script src="/storage/basset/vendor/backpack/theme-tabler/resources/assets/js/tabler.js?b066c6427562"></script>
Mirko-Tebaldi commented 10 months ago

Thanks, but we have same problem with a fresh install on a clean project. Anyway we'll try. I'll tell you in a few day due to my holidays How to upgrade tabler? I hoped it will be upgraded when upgrading backpack [please document it] We have nothing published and only 1-2 small blades ovverriden [buttons and filters]

Check you .env file. The basset is automatically disabled in local https://github.com/Laravel-Backpack/basset#installation

BASSET_DEV_MODE=true

Anyway it worked.

But ... why some file wer 'bassetted' if the dev mode was false ?

pxpm commented 10 months ago

The "non-public" files (the ones backpack load from vendor folder) need to be "internalized" everytime because they are in a non-accessible folder.

The public cdn links and other javscript in files don't get internalized when basset is disabled so that you are always working with a "fresh" copy.