Laravel-Backpack / community-forum

A workspace to discuss improvement and feature ideas, before they're actually implemented.
28 stars 0 forks source link

[HAS-FIX] ASSETS NOT LOADING FROM CDNS - 12-04-2024 #928

Closed pxpm closed 2 months ago

pxpm commented 2 months ago

We are aware of an issue that started today where some CDNs refuse to serve the links with ?extraParameters.

We use a ?nonce= parameter in our assets for cache-busting.

For a WORKAROUND, please add BASSET_DEV_MODE=false and cache locally your assets with php artisan basset:cache (even in localhost if you want to work until this problem is solved).

~~We think this is a TEMPORARY issue and we will keep a close eye on it. In case it lasts for more time than expected, we may have to reconsider the usage of the cache busting string and fix it on our side.~~

Please remember that if you cache the assets when deploying to production (as you should), we use the local assets, so everything will work just fine.

Please do a composer update to get CRUD 6.7.6 that will automatically update basset to 1.3.1.

Let us know if you are still experiencing issues.

pxpm commented 2 months ago

Some calls still work, weirdo! image

For example https://unpkg.com/noty@3.2.0-beta-deprecated/lib/noty.css?fa587b39e127 returns a redirect to https://unpkg.com/noty@3.2.0-beta-deprecated/lib/noty.css while https://unpkg.com/@tabler/core@1.0.0-beta19/dist/css/tabler.min.css?fa587b39e127 does not redirect and simply fails.

dauvray commented 2 months ago

Hello,

php artisan basset:cache put 'error code: 520' in files .

image

pxpm commented 2 months ago

@dauvray it's possible that php artisan basset:check will return an error that you will need to fix.

Most likely APP_URL in your .env file is not properly set, or if that's a container, you should probably be exposing/using a friendly url like http://my-project.test.

If you have other issues regarding the basset:cache please open an issue in https://github.com/Laravel-Backpack/basset

Cheers

pxpm commented 2 months ago

We have released https://github.com/Laravel-Backpack/CRUD/releases/tag/6.7.6 with the fix. It should update basset to version 1.3.1. https://github.com/Laravel-Backpack/basset/releases/tag/1.3.1

If anyone still experiencing issues after composer update please let us know.

rich-williamson commented 2 months ago

Thank you, I can confirm that has resolved the issue for me.