문제

When running deploy static content on my store i always need to add the locale at the end of the command or my store breaks.

bin/magento setup:static-content:deploy en_GB

I was wondering if I am doing anything wrong here and if i can set this so the locale is not required.

도움이 되었습니까?

해결책

The accepted answer doesn't answer OP's question:

I was wondering if I am doing anything wrong here and if I can set this so the locale is not required

There is a way to ensure only used locales are deployed. You can employ GetPageSpeed n98-magerun2 commands for the job, e.g.:

php ./bin/magento setup:static-content:deploy $(n98-magerun2 deploy:locale:active)

You can save it to a script which is part of your deployment workflow, and then no matter what actual locales are used, only they will be "deployed", without having to hardcode them anywhere.

다른 팁

Magento2 deploys only for en_US locale by default. And if you are using en_GB locale for your site then you need to always add the locale to ythe deploy command.

bin/magento setup:static-content:deploy en_GB

You need deploy your language to run below command

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy en_GB en_US
php bin/magento cache:clean

Let me know if you have any issue.

Try the code like that.

bin/magento setup:static-content:deploy --language en_GB

for reference please check Magento deploy command

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top