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

Asked

Viewed 181 times

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 image files.

After some research I found 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 continues to occur

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 

1 answer

0


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

And the command how it was executed 'sudo php bin/Magento setup:Static-content:deploy' 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 for.

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

With this failure ceases to occur

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.