문제

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