Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magento 2 Static Deploy Issue #4229

Closed
jordanbrierley opened this issue Apr 19, 2016 · 8 comments
Closed

Magento 2 Static Deploy Issue #4229

jordanbrierley opened this issue Apr 19, 2016 · 8 comments
Assignees
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@jordanbrierley
Copy link

jordanbrierley commented Apr 19, 2016

I have changed my local settings in the backend (store->config->general) all to the United Kingdom so my theme looks in the en_GB folder however the admin still looks in the en_US folder after deploying.

This creates a problem when it comes to running 'bin/magento setup:static-content:deploy' as it only deploys it to the en_US folder meaning only the admin displays correctly. I know you can use prefix it with en_GB however doing this causes the admin to break and not show correctly.

Is there a way to change the admin so it looks in the en_GB folder or is it just a case of either:

  1. deploying twice, once in each folder
  2. changing my store so it's set in US which wouldn't be ideal?
@janakadombawela
Copy link

janakadombawela commented Apr 21, 2016

Have you tried setup:static-content:deploy en_GB ? I'm currently developing same en_GB store and this is what I do. First deploy without en_GB and then use above command.

@jordanbrierley
Copy link
Author

Yeah that's what I've been doing but seems strange deploying it twice, once for the admin and once for the frontend, I thought it would just deploy to the correct ones set in the locale really so you just have to deploy once but if doing it twice is the only way that's no problem

@mazhalai
Copy link
Contributor

@jordanbrierley thank you for reporting, we have created ticket MAGETWO-52422 to investigate and fix.

@mazhalai mazhalai added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Apr 29, 2016
@piotrekkaminski piotrekkaminski self-assigned this May 24, 2016
@joanhe
Copy link
Contributor

joanhe commented Jun 3, 2016

@jordanbrierley After investigation, this is identified as not a bug. Here is deploy static content command options:
magento setup:static-content:deploy [lang] ... [lang] [--dry-run]
User can supply multiple languages in this command to deploy static content in multiple locales. For this case, you can do:
magento setup:static-content:deploy en_US en_GB

I will close this issue for now. Please feel free to open it if you have unanswered questions relate to this issue.

@joanhe joanhe closed this as completed Jun 3, 2016
@kweij
Copy link
Contributor

kweij commented Aug 5, 2016

Hi Joahne,

Why is this not a bug? Is it always required to deploy static content for en_US even if that locale is not used for one of the store? I assumed that deployment of static content was only required for the actually used locales.

Maybe I'm overlooking something, but if the admin has a hard dependency on static content from the en_US locale, that seems like a bug. Could you please explain?

@hostep
Copy link
Contributor

hostep commented Aug 5, 2016

@kweij: every theme needs to be deployed in the locales it is using.
The backend of Magento is also built on a theme: Magento/backend, and when you install Magento, it is default configured with the locale en_US. If you don't change the locale in the configuration, you need to deploy that locale as well.

There is a pending PR which will allow you to specify a combination of themes and locales in the setup:static-content:deploy command: #4294

This will allow you to do something like this:

bin/magento setup:static-content:deploy --theme Magento/backend en_US
bin/magento setup:static-content:deploy --theme My/CustomTheme de_DE fr_FR nl_NL

Which will significantly improve the performance during each deploy.

I suspect the PR to be merged in version 2.2 of Magento as Piotr mentions in that PR.

@kweij
Copy link
Contributor

kweij commented Aug 5, 2016

@hostep: Thanks for the explanation. So, the backend does not have a hard dependency on en_US, it's just got this locale as a default.

Looking forward to pull request being merged, that will definitely improve the speed with which we can deploy content.

@mnjenga
Copy link

mnjenga commented Aug 7, 2016

Hi Joan, I need assistance on a specific implementation of the payment module for a local mobile wallet (Mpesa). Apologies for using the wrong forum for this. My email is moses@kwetu.info.

magento-engcom-team pushed a commit to okorshenko/magento2 that referenced this issue May 30, 2019
- fixed  Product belongs to categories with and without event does not shown
- fixed  [GITHUB] Product Edit Page Can't Load magento#5967
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests

9 participants