Magento: Failed to load resource - When language is set to pt_BR

0

After following the step by step installation of Magento, when trying to access both the frontend and the administrative panel, the site does not load the css, javascript and images files.

After some research I discovered that I needed to run a command to generate the static files.

cd /var/www/html/magento
sudo php bin/magento setup:static-content:deploy

After running the tool:

#:/var/www/html/magento$ sudo php bin/magento setup:static-content:deploy
Requested languages: en_US
Requested areas: frontend, adminhtml
Requested themes: Magento/blank, Magento/luma, Magento/backend
=== frontend -> Magento/blank -> en_US ===
=== frontend -> Magento/luma -> en_US ===
=== adminhtml -> Magento/backend -> en_US ===
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Successful: 2136 files; errors: 0
---

........................................................
Successful: 2061 files; errors: 0
---

............................................................................................................................................................................................................................................
Successful: 2012 files; errors: 0
---

=== Minify templates ===

Successful: 869 files modified
---

New version of deployed files: 1494363632

But even after that, the error still occurs

Failed to load resource: the server responded with a status of 404 (Not Found) /magento/pub/static/version1494362497/frontend/Magento/luma/pt_BR/css/print.css 
    
asked by anonymous 10.05.2017 / 18:25

1 answer

0

Magento, at installation time, has been set to pt_BR language.

And the command of the way 'sudo php bin / magento setup: static-content: deploy' is executed generates the files for the default language (en_US)

To solve the problem, you need to pass an extra parameter indicating which language the static files should be generated in.

sudo php bin/magento setup:static-content:deploy pt_BR 

As a result, the crash no longer occurs

Requested languages: pt_BR
Requested areas: frontend, adminhtml
Requested themes: Magento/blank, Magento/luma, Magento/backend
=== frontend -> Magento/blank -> pt_BR ===
=== frontend -> Magento/luma -> pt_BR ===
=== adminhtml -> Magento/backend -> pt_BR ===
..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Successful: 2012 files; errors: 0
---

............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Successful: 2061 files; errors: 0
---

.................................................................................................................................................................................................................................................................................................................................
Successful: 2136 files; errors: 0
---

=== Minify templates ===

Successful: 869 files modified
---

New version of deployed files: 1494363897
    
10.05.2017 / 18:25