سؤال

Not my first time to install Magento 2, but something strange this time. I have checked file permission, cleaned cache, deployed again. Files are created in pub/static in expected directories but checking browser console I see there is "version###" subdirectory in path. How this is happening?

enter image description here

هل كانت مفيدة؟

المحلول

We can disable it in Admin:

Stores > Configuration > Advanced > Developer > Sign Static Files

Or we can change directly the value in core_config_data:

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

نصائح أخرى

Run the following commands and you will see static version number in the static URLs (CSS, JS etc.)

bin/magento config:set dev/static/sign 1

bin/magento cache:clean

bin/magento cache:flush

Hope it helps :)

1)Run SQL query on DB (to disable Sign Static Files)

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

2)After That clean and Flush Magento Cache

bin/magento cache:clean
bin/magento cache:flush

And Refresh the page

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top