0

In Magento 2.2.2 when setting website into production mode the following files are not loading, due to which my store switcher and other ui functions are not working in production mode:

All the CSS and Fonts are loading properly in both production as well as developer mode.

Important: I was not able to find these js files in developer mode when checked the network tab of inspector.

Can someone tell me where to look for errors?

Update 1:

I have checked and found that these js file errors are only found in default (pt_BR) Store. When I have checked it for other store(en_US) there were no errors and everything is working fine in this store.

Update 2:

When I have tried php bin/magento setup:static-content:deploy en_US pt_BR then these js file error occurred in both the stores.

P.S: There is nothing helpful in var logs.

  • I am also faced this issue and raised here, I am still looking for proper solution, but I solved it by setting mode as default, then everything works fine for me. – jafar pinjar Aug 31 '18 at 17:05
  • @jafarpinjar Still default mode is same as developer. I need to enable production mode. – Wasiq Shahrukh Sep 3 '18 at 3:51
  • 1
    It is not possible to set default Magento mode ! production or developper, a default one is just set by default when you install a Magento in the first time. – PЯINCƏ Sep 3 '18 at 7:45
0

It is not possible to set default Magento mode ! production or developper, a default one is just set by default when you install a Magento in the first time.

Try this:

  1. Remove the content of the bellow folders except the .htaccess

    • var/cache
    • var/page_cache
    • var/view_preprocessed
    • generated
    • pub/static
  2. php bin/magento setup:static-content:deploy -f

More informations in MAGENTO DEVDOCS

  • This still didn't worked for me. The 3 js files are still showing 404 in default store. – Wasiq Shahrukh Sep 3 '18 at 9:14
  • Try this : php bin/magento setup:static-content:deploy en_US -f – PЯINCƏ Sep 3 '18 at 9:19
  • Yes I have tried php bin/magento setup:static-content:deploy en_US pt_BR -f but still no change. – Wasiq Shahrukh Sep 3 '18 at 9:23
  • Your default config language is en_US ? – PЯINCƏ Sep 3 '18 at 9:36
  • No, Default store language is pt_BR and I have just updated my question. – Wasiq Shahrukh Sep 3 '18 at 9:48
0

I have this problem too. en_GB is my default. Deploy static content for both en_US and en_GB and jquery.min & plugins.min both do not exist in pub/static.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.