I added one product from Magento admin panel (Magento 2.2.2)

Cleared cache and indexing, Product appears in search and listing page and you can even add to cart from Listing page.

But when you click on the product and visit the product details page it gives the blank screen

In the network tab, it shows status code 200 and in the page source, it shows the empty body.

There is nothing in var/log/* and /var/log/apache2/error.log

And i tried adding

   ini_set('display_errors', 1);

in index.php at root folder

  • Check Magento log files under [document root]/var/log folder. There you can find some clue. Commented May 9, 2018 at 11:18
  • If nothing is found there, you need to check apache error logs on the server also. Commented May 9, 2018 at 11:20
  • sorry , i forgot to mention that there is nothing in var/log/* and /var/log/apache2/error.log
    – Ash-b
    Commented May 9, 2018 at 11:28
  • Refer this link.
    – Pratik Oza
    Commented May 9, 2018 at 11:37
  • try to add error_reporting(E_ALL); and ini_set('display_errors', 1); in index.php of pub directory, you can find it on pub> index.php and check
    – Keyur Shah
    Commented May 9, 2018 at 12:05

2 Answers 2


I have been in similar kind of situation, I have migrated the data from magento 1.9.x to magento 2.2.8 and there was two website in magento, for the default website the product detail page was working fine but for the other website it was not, I was only able to see the blank page where noting rendered in body tag, with that, one thing was sure that it is a layout related issue as magento was unable to load the layout. After spending a day I finally found that in the secondary website layout was updated at product level but it is was also observed that you need to check updated layout in the website>store for the product. The main reason is that code of the layout in magento 1.9 was different to magento 2.x, so try to check layout updates. This may help you in certain conditions only.


1.Navigate to your MagentoDir on server or localhost via terminal or if you can open the file in a text editor like Notepad or sublime text.

2.Enter the following command and see the system log, it will contain the broken reference of the DOM/Product Details Page. This is mainly when you have changed your category_product_view.xml in a custom theme (trying to override the default template) or the default theme and it breaks the layout of the page.

tail -f var/log/system.log    

if that dosen't give you any hints try the following:

tail -f var/log/exception.log   

tail -f var/log/debug.log    

Hope you found it useful.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.