0

Magento 2 local development installation is working fine, however the production installation has some issues regarding the checkout. Certain files are not loaded, resulting in an endless spinning wheel load screen.

Looking up the missing files, I found out a lot of js files are not being deployed to the static folder on the live server. They are being deployed on the local environment however. Thoughts or tips would be welcome! magento 2 js error

  • compile first and change to production – Rama Chandran M Jul 5 '17 at 7:45
1

If your production environment uses SSL make sure to have the environment variable HTTPS set to on.

You can set it as part of the static-content:deploy command HTTPS='on' php bin/magento setup:static-content:deploy

  • 2
    Thanks!! This solved my problem, all js files are now deployed correctly and checkout is behaving like normal again. – perrivdb Jul 5 '17 at 13:40
0

Hard to say based off this info alone, although this should resolve:

  1. Ensure your environment is in production mode - php bin/magento deploy:mode:set production
  2. Run php bin/magento setup:static-content:deploy
0

If the files are not found in the static files, you need the proper deployment and proper file permissions.

Open the terminal and navigate to magento web root

 $ cd /var/www/html/magento2 
Step 1.

 $ php bin/magento setup:static-content:deploy
Step 2.

$ php bin/magento indexer:reindex
Step 3.

make sure apache “rewrite_module” is enable and then restart the server

Step 4.

$ chown -R apache:apache /var/www/html/magento2 //change the group and user name as per your server
Step 5.

 $ chmod -R 777 /var/www/html/magento2 
Step 6.

delete cache folder under var/cache

And for the file permissions, please look on the following link:

http://devdocs.magento.com/guides/v2.0/install-gde/prereq/file-system-perms.html

  • Thanks for your suggestion, although all file permissions were set correctly. the answer @codekipple gave me solved my problem! – perrivdb Jul 5 '17 at 13:39

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.