4

I tried to minify html as a way to increase page load speed, by recommendation of Google Page Speed.

When I minified the html code, the site broke. Just a blank white page.

I checked Github and saw an issue regarding minification but I doubled checked the files on my install and they contain the patches which were supposedly release with Magento 2.1.2.

Does any one have any insight into why minifying html would throw a black front page?

I did do the following after setting the "Minify Html" dropdown to "Yes":

  1. Cleared all caches.
  2. Cleared pub/static and var directories.
  3. Ran compile.
  4. Deployed static content.
  5. Refreshed caches.

The blank page is only on the front end. Could someone point me in the direction to showing what errors are happening, or if this has happened to you as well, please do share.

**I searched and all I could find was information on the BIG minify js problem, which I have as well, but can't do anything about.

Thanks in advance.

  • Uncomment line 11 in app/bootstrap.php to see what the error is. – Aaron Allen Dec 5 '16 at 12:29
5

I have had exactly the same problem as you was having.

When i made a production site i also tried enabling everything that had to do with caches as well as the html minification.

What you could do is checking the php error log on your webserver. There you can see exactly which file is causing you trouble. It probably has something to do with php tags like this:

<?php //samplecomment?> <--- this breaks it!
<?php //samplecomment ?> <--- this doesn't break it

You can read more about this here: https://github.com/magento/magento2/issues/5316

  • I also facing same issue .....But its not working for me – Mahi M Aug 11 '18 at 10:32

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.