Magento – Magento 2 System Log Errors

layoutmagento2

Just had a look at the var/log/system.log file and surprised to see the number of errors. I cleaned up the file and refreshed the website and it logged following errors:

[2016-10-12 14:27:20] main.CRITICAL: Broken reference: the 'header.panel.wrapper' element cannot be added as child to 'header.container', because the latter doesn't exist [] []
[2016-10-12 14:27:20] main.CRITICAL: Broken reference: the 'header-wrapper' element cannot be added as child to 'header.container', because the latter doesn't exist [] []
[2016-10-12 14:27:20] main.CRITICAL: Broken reference: the 'navigation.sections' element cannot be added as child to 'page.top', because the latter doesn't exist [] []
[2016-10-12 14:27:20] main.CRITICAL: Broken reference: the 'top.container' element cannot be added as child to 'page.top', because the latter doesn't exist [] []
[2016-10-12 14:27:20] main.CRITICAL: Broken reference: the 'breadcrumbs' element cannot be added as child to 'page.top', because the latter doesn't exist [] []
[2016-10-12 14:27:20] main.CRITICAL: Broken reference: the 'footer' element cannot be added as child to 'footer-container', because the latter doesn't exist [] []
[2016-10-12 14:27:20] main.CRITICAL: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-10-12 14:27:20] main.CRITICAL: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-10-12 14:27:20] main.CRITICAL: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-10-12 14:27:20] main.CRITICAL: Broken reference: the 'header.panel.wrapper' tries to reorder itself towards '', but their parents are different: 'header.container' and '' respectively. [] []
[2016-10-12 14:27:20] main.CRITICAL: Broken reference: the 'navigation.sections' tries to reorder itself towards '', but their parents are different: 'page.top' and '' respectively. [] []

Same behavior on a fresh installation with no custom theme!
Any idea to why these layout errors!!

Best Answer

From what i can tell the issue seems to be due to messy layouts and that are not getting moved or rendered correctly on certain pages.

The examples i have looked into so far is the catalog.compare.sidebar and sale.reorder.sidebar which are in the Magento Catalog module default.xml layout file however on the product page there is no sidebar so these fail to render. I believe this is default behaviour however as there is no sidebar on product pages and so this error is happening on even vanilla Magento installations.

So far i have tried removing the block from the product page but this does not help the error. Only thing i can think is to remove the block from the default.xml within a custom theme and add back into each page type individually on pages that do contain the sidebar.

Related Topic