cancel
Showing results for 
Search instead for 
Did you mean: 

CSS Not loading - Unable to disable static files sign

CSS Not loading - Unable to disable static files sign

Hi community, suddenly the CSS of my store stopped loading.

 

I've tried to do the following:

bin/magento maintenance:enable
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento app:config:import
bin/console exec setup:db-data:upgrade
bin/magento setup:static-content:deploy -f --theme Codazon/fastest_grocery_gourmet
bin/magento cache:clean
bin/magento cache:flush
bin/magento indexer:reindex
bin/magento maintenance:disable

I've also changed tried to change the 'Static Files Sign' config on the database:

insert into core_config_data (config_id, scope, scope_id, path, value) values (null, 'default', 0, 'dev/static/sign', 0);

 On Magento Management Backend the Static Files Signs still says Yes. I've tried to run the first script block again. The error persists. 
Any ideas?

6 REPLIES 6

Re: CSS Not loading - Unable to disable static files sign

Hello @antonioaraujo 

 

Here are the some steps which you should check

1) Can you please check it store wise may be there will enable in store wise. 

 

You can disabled it via command line also like 

 

bin/magento config:set dev/static/sign <1 or 0>

bin/magento cache:flush

 

you can check it via mysql console or phpmyadmin

select * from core_config_data where path like '%dev/static/sign%';

 

2) Please check you are in developer or production mode. 

You can check it via bin/magento deploy:mode:show

if it's production mode than please run all commands

 

3) if still not fix than please check if there is any server cache enable or not. if enable than please flush it and check it.

 

Let me know if any issues

 

If my answer is useful, please Accept as Solution & give Kudos

 

Thank you

Anant P

Thank you
Anant Prajapati
Magento Certified Developer

Re: CSS Not loading - Unable to disable static files sign

Thanks for the quick reply.

 

I tried your solution but it didn't work. I suspect that the problem is somewhere else:

image.png

 

It isn't loading the assets because of an invalid cert. I will search on how to solve this. 
Thanks for your reply anyway.

 

 

Re: CSS Not loading - Unable to disable static files sign

HI @antonioaraujo,

Try the below solution

For Ubuntu / Debian edit the file /etc/apache2/apache2.conf. To edit this file run command


sudo vi /etc/apache2/apache2.conf

Modify from:

<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>

to

<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>

Then restart apache

sudo service apache2 restart

or

sudo /etc/init.d/apache2 restart

I hope it will help you!

Re: CSS Not loading - Unable to disable static files sign

Hello @antonioaraujo 

 

Please check .htaccess file under magento installation directory as well as under pub/static/

 

if missing than please upload it. if its there than please check with mod_rewrite module enabled or not.

 

If my answer is useful, please Accept as Solution & give Kudos

Thank you
Anant Prajapati
Magento Certified Developer

Re: CSS Not loading - Unable to disable static files sign

Hi guys, thanks again for the support. 

 

It turned out to be a problem with the certificate, once I'm on my local machine, I was developing another site before which had different certificates but the same IP. The browser interpreted it as a hack.

There are 2 possible solutions here.

1. Disable HTTPS transcript on Magento Admin > Stores > Web.

2. (I personally prefer this one once is what I use and recommend to use on production) Trust the certificate. Which can be done by adding it to Keychain on Mac. Or by following this trick:
https://stackoverflow.com/questions/58802767/no-proceed-anyway-option-on-neterr-cert-invalid-in-chro...

Re: CSS Not loading - Unable to disable static files sign

Run this command 
bin/magento config:
set dev/static/sign 1

bin/magento cache:flush
Also check your base url too