2

Anytime I switch to production mode, the system does not display the product images on the product pages. The wheel just keeps rotating. This only happens in production mode. I have compiled, flushed, deployed static content, flushed static content, everything.

But switching my Magento 2.1 (PHP 7.0) into production mode makes a spinning wheel for my product images on the product page, and, a spinning wheel after logging into the backend.

Don't even know where I can debug this or look for errors.

2

Keeping Magento in developer mode is not recommended. Instead I would recommend you to debug the issue until you find what is wrong and fixed it.

Keeping Magento in Developer Model will:

  • Slow down the system as well the user experience since the static view files are not served from pub/static and instead generated every time a page is reloaded.
  • Display errors and exceptions to the users.

http://devdocs.magento.com/guides/v2.0/config-guide/bootstrap/magento-modes.html

Regarding the issue and for what you are saying it could be and issue related to the generation of the static content.

  • Have you deployed the static content after switched to production mode?
  • Do you get any warning/error when switch between modes or deploying the static content?
  • Have you cleared cache?
  • If you inspect the code in your browser after switch to production, can you spot any error?
  • Is your web server well configured to serve those static files?

When deploying the static content, you can use -vv at the end to get a more verbose output.

magento setup:static-content:deploy -vv

Hope this help you find/fix your issue and change your mind about keep your application running in developer mode.

  • I have two versions of the site: one with SSL and one without SSL. The issue with the images is only happening on the SSL enabled website. The actual live website. The development website (which sits on the same server and is an exact copy of the live website) does not have this problem. The only different between the two sites is one is SSL and the other is not. – styzzz Jul 28 '17 at 3:16
0

Solution:

In case anyone else is having the same problem: the issue was not with production mode. Its the enabling of merging and compressing CSS and JS files on the backend. That was it. Its a known bug in Magento, and they are still working on this issue. I wish I didnt waste 3 weeks trying to figure this out !

  • You are saying it is a core bug, could you provide the issue number or the Github link where is being reported and discussed? – diazwatson Jul 31 '17 at 16:11
  • Its all over github.....not sure if I can post links on here, but you can look at Github: Magento 2: Issues #1203, #4345 #4321 – styzzz Jul 31 '17 at 18:30

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.