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:
http://website.com/static/frontend/vendor/theme/en_US/jquery/ui.js
http://website.com/static/frontend/vendor/theme/en_US/jquery/validate.js
http://website.com/static/frontend/vendor/theme/en_US/jquery/jquery-storageapi.js
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.
2 Answers 2
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:
Remove the content of the bellow folders except the
.htaccess- var/cache
- var/page_cache
- var/view_preprocessed
- generated
- pub/static
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– Wasiq Shahrukh2018年09月03日 09:14:11 +00:00Commented Sep 3, 2018 at 9:14
-
Try this :
php bin/magento setup:static-content:deploy en_US -f2018年09月03日 09:19:40 +00:00Commented Sep 3, 2018 at 9:19 -
Yes I have tried
php bin/magento setup:static-content:deploy en_US pt_BR -fbut still no change.Wasiq Shahrukh– Wasiq Shahrukh2018年09月03日 09:23:05 +00:00Commented Sep 3, 2018 at 9:23 -
Your default config language is
en_US?2018年09月03日 09:36:44 +00:00Commented Sep 3, 2018 at 9:36 -
No, Default store language is
pt_BRand I have just updated my question.Wasiq Shahrukh– Wasiq Shahrukh2018年09月03日 09:48:46 +00:00Commented Sep 3, 2018 at 9:48
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.
Explore related questions
See similar questions with these tags.
defaultMagento mode !productionordevelopper, a default one is just set by default when you install a Magento in the first time.