cancel
Showing results for 
Search instead for 
Did you mean: 

Merged JS and CSS do not work when Production mode

SOLVED

Merged JS and CSS do not work when Production mode

I was in developer mode, everything was great, when I changed to Production mode, the Merged options of CSS and JS seems to be ignored, it was back listing all css and js.

 

Also The product page only shows the pictures of the product in developer mode, also changing to production mode it disappear.

Any thought to help me?

 

Thanks a lot!

4 REPLIES

Re: Merged JS and CSS do not work when Production mode

In the production mode (in contrast to the developer mode) the static content should be deployed manually: https://mage2.pro/t/759

Re: Merged JS and CSS do not work when Production mode

Hi there.

 

The point is, I'm doing it.

 

Here is what I did in sequence:

 

bin/magento setup:upgrade

bin/magento indexer:reindex

bin/magento setup:static-content:deploy

bin/magento setup:di:compile

bin/magento deploy:mode:set production

bin/magento setup:static-content:deploy

 

And before even start, the Merge options are YES and I was in developer mode.

 

Re: Merged JS and CSS do not work when Production mode

Hey Guys.

 

I just did the following and the problem was solved.

 

bin/magento setup:upgrade

bin/magento indexer:reindex

bin/magento deploy:mode:set production -s

bin/magento setup:di:compile (Here was the secret, to run the di:compile after production)

bin/magento setup:static-content:deploy

 

Thanks

Re: Merged JS and CSS do not work when Production mode

Hello,

 

I have the same problem and tried the same steps as you did. However, I still have the same problem. 

 

Additional to your steps, I checked all folder permissions and flushed the cache, but nothing seems to work here.  The problem exists in both the front and backend of my site.

 

Before I changed to production mode, everything worked fine. When I changed back to developer mode, the problem still exists.

 

 

Does anyone have an idea about what could be wrong?

 

Thanks

 

 

Tags (3)