Magento2: main.CRITICAL: Broken reference (Magento CE v2.1)

Created on 13 Jul 2016  路  17Comments  路  Source: magento/magento2

The following system.log entries appear in Developer Mode

@piotrekkaminski unfortunately this does not seem to be fixed in CE 2.1 per #3507 (which has been closed), so I have created a new issue.

Installation following devdocs instructions for composer and cli install. vcl for varnish 4 generated through Magento Admin. Following install 'php bin/magento indexer:reindex' was run.

Developer Mode File Permissions: (nginx is member of www-data group)

cd <magento_web_root_directory> && find . -type d -exec chmod 770 {} \; && find . -type f -exec chmod 660 {} \; && chown -R www-data:www-data . && chmod u+x bin/magento

Setup: Nginx (443) --> Varnish 4 --> Nginx --> Magento CE v2.1

Home: First page load after cache flush

[2016-07-13 16:43:21] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_2c7461af04bb11fe209659d7147d2c579 and handles default, cms_index_index, cms_page_view, cms_index_index_id_home: Please correct the XML data and try again.  [] []
[2016-07-13 16:43:22] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_20a98983867a1770682b48d9a0ad63441 and handles 1column: Please correct the XML data and try again.  [] []
[2016-07-13 16:43:22] main.CRITICAL: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:43:22] main.CRITICAL: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:43:22] main.CRITICAL: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:43:22] main.CRITICAL: Broken reference: the 'paypal.partner.right.logo' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:43:22] main.CRITICAL: Broken reference: the 'bml.right.logo' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:43:22] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_26f1b068ec7ccf4878f9284dd1137afd1 and handles catalog_product_prices: Please correct the XML data and try again.  [] []
[2016-07-13 16:43:22] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_2cf9ab1b1723bedc1dcd665a812b00335 and handles admin-1column: Please correct the XML data and try again.  [] []
[2016-07-13 16:43:22] main.CRITICAL: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:43:22] main.CRITICAL: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:43:22] main.CRITICAL: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:43:22] main.CRITICAL: Broken reference: the 'paypal.partner.right.logo' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:43:22] main.CRITICAL: Broken reference: the 'bml.right.logo' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []

Home: Subsequent page refresh (Ctrl + F5)

  • no log entries

Privacy and Cookie Policy: First page load after cache flush

[2016-07-13 16:13:40] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_2d15e9460690f60c1bc7a93d558807785 and handles default, cms_page_view, cms_page_view_id_privacy-policy-cookie-restriction-mode: Please correct the XML data and try again.  [] []
[2016-07-13 16:13:40] main.CRITICAL: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:13:40] main.CRITICAL: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:13:40] main.CRITICAL: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:13:40] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_2cf9ab1b1723bedc1dcd665a812b00335 and handles admin-1column: Please correct the XML data and try again.  [] []
[2016-07-13 16:13:40] main.CRITICAL: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:13:40] main.CRITICAL: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:13:40] main.CRITICAL: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []

Privacy and Cookie Policy: Subsequent page refresh (Ctrl + F5)

  • no log entries

Orders and Returns: First page load

[2016-07-13 16:17:04] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_2deafad4772f91b941cf386aa0b46401e and handles default, sales_guest_form: Please correct the XML data and try again.  [] []
[2016-07-13 16:17:04] main.CRITICAL: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:17:04] main.CRITICAL: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:17:04] main.CRITICAL: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:17:04] main.CRITICAL: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:17:04] main.CRITICAL: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:17:04] main.CRITICAL: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []

Order and Returns: Subsequent page refresh (Ctrl + F5)

  • no log entries

Search Terms: First page load after cache flush

[2016-07-13 16:19:37] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_2dd8d68d60e557251729107544ad7e33e and handles default, search_term_popular: Please correct the XML data and try again.  [] []
[2016-07-13 16:19:37] main.CRITICAL: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:19:37] main.CRITICAL: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:19:37] main.CRITICAL: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []

Search Terms: Subsequent page refreshes (Ctrl + F5)

[2016-07-13 16:24:11] main.CRITICAL: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:24:11] main.CRITICAL: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:24:11] main.CRITICAL: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []

Contact Us: First page load after cache flush

[2016-07-13 16:28:29] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_2c1a79df4e2fb1a01d9ef5b0d7391ab5f and handles default, contact_index_index: Please correct the XML data and try again.  [] []
[2016-07-13 16:28:29] main.CRITICAL: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:28:29] main.CRITICAL: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:28:29] main.CRITICAL: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []

Contact Us: Subsequent page refreshes (Ctrl + F5)

[2016-07-13 16:29:56] main.CRITICAL: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:29:56] main.CRITICAL: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:29:56] main.CRITICAL: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []

Advance Search: First page load after cache flush

  • no log entries

Advanced Search: 1st page refresh (Ctrl + F5)

[2016-07-13 16:48:03] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_2eafd64351df05cd70fb508ddcbf7661b and handles default, catalogsearch_advanced_index: Please correct the XML data and try again.  [] []
[2016-07-13 16:48:03] main.CRITICAL: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:48:03] main.CRITICAL: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:48:03] main.CRITICAL: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:48:03] main.CRITICAL: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:48:03] main.CRITICAL: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:48:03] main.CRITICAL: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []

Advance Search: 2nd...n page refreshes (Ctrl + F5)

[2016-07-13 16:35:17] main.CRITICAL: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:35:17] main.CRITICAL: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-13 16:35:17] main.CRITICAL: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []

Thanks

Frontend Ready for Work bug report

Most helpful comment

@maksek sorry, I had to delete all my m2 project and start again in m1.9 , dont have the project anymore.

All 17 comments

Same issue(s) here. Magento 2.0.x had same issues as well.

Same here with 2.1.1

Same issue(s) with 2.1.2.

Similar log appear after i added product to cart:

[2016-11-03 12:04:57] main.CRITICAL: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-11-03 12:04:57] main.CRITICAL: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-11-03 12:04:57] main.CRITICAL: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-11-03 12:04:57] main.CRITICAL: Broken reference: the 'checkout.cart.item.renderers.gift-card.actions.gift_options' element cannot be added as child to 'checkout.cart.item.renderers.gift-card.actions', because the latter doesn't exist [] []
[2016-11-03 12:04:57] main.CRITICAL: Broken reference: the 'checkout.cart.item.renderers.gift-card.actions.gift_options' tries to reorder itself towards '', but their parents are different: 'checkout.cart.item.renderers.gift-card.actions' and '' respectively. [] []
[2016-11-03 12:04:57] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_1d41d8cd98f00b204e9800998ecf8427e and handles : Please correct the XML data and try again. [] []

In Chrome, 'Add to cart' button always stopped at 'Adding..', and products didn't appear in cart. In Firefox the cart functionality still working.

I guess this will be broken for a while in entire 2.1.x stack.

Same issue here. This happens when rendering catalog_product_view:

[2016-11-21 14:20:09] main.CRITICAL: Broken reference: the 'product.info.price' tries to reorder itself towards 'product.info.review', but their parents are different: 'product.info.main' and 'product.info.price' respectively. [] []
[2016-11-21 14:20:09] main.CRITICAL: Broken reference: the 'product.price.final' tries to reorder itself towards 'product.info.sku', but their parents are different: 'product.info.price' and 'product.info.stock.sku' respectively. [] []
[2016-11-21 14:20:09] main.CRITICAL: Broken reference: the 'product.info.social' tries to reorder itself towards 'product.info.overview', but their parents are different: 'product.info.extrahint' and 'product.info.main' respectively. [] []
[2016-11-21 14:20:09] main.CRITICAL: Broken reference: the 'view.addto.wishlist' tries to reorder itself towards 'view.addto.requisition', but their parents are different: 'product.info.addto' and '' respectively. [] []
[2016-11-21 14:20:09] main.CRITICAL: Broken reference: the 'bml.right.logo' tries to reorder itself towards 'product.info.addtocart.paypal', but their parents are different: 'product.info.addtocart' and '' respectively. [] []

and this happens when adding a product to cart (then it remains stuck on "Adding...")

[2016-11-21 14:21:24] main.CRITICAL: Broken reference: the 'checkout.cart.item.renderers.gift-card.actions.gift_options' element cannot be added as child to 'checkout.cart.item.renderers.gift-card.actions', because the latter doesn't exist [] []
[2016-11-21 14:21:24] main.CRITICAL: Broken reference: the 'checkout.cart.item.renderers.gift-card.actions.gift_options' tries to reorder itself towards '', but their parents are different: 'checkout.cart.item.renderers.gift-card.actions' and '' respectively. [] []
[2016-11-21 14:21:24] main.CRITICAL: Broken reference: the 'checkout.cart.totals.container' tries to reorder itself towards 'checkout.cart.form', but their parents are different: 'checkout.cart.items' and 'checkout.cart.container' respectively. [] []
[2016-11-21 14:21:24] main.CRITICAL: Broken reference: the 'checkout.cart.form' tries to reorder itself towards 'cart.summary', but their parents are different: 'checkout.cart.items' and 'checkout.cart.container' respectively. [] []

I found that the problem is related to cookies usage on website with domain name less than 2 dots, e.g localhost. It's explained here:
https://alankent.me/2015/04/25/use-of-localhost-when-installing-magento-2-quick-note/

So I followed the solution:

  1. Add localhost.dev to etc/hosts,
  2. Change base url to localhost.dev via admin panel.

Now product cart works in all browsers, no more broken reference logs.

Hope this helps, thanks.

I'm working on a server but can't use the official domain yet, so the base url is now something like http://00.00.00.00/~name. If 127.0.0.1 works better with cookies, then anything outside the canonical IP or www.website.com breaks the cookies?

is there a way to fix it ? It's breaking my shopping process

@converge can you share what exactly broken in your shopping process? I see there are two issues described:

  1. verbose output for layout, which is not affecting function of Magento.
  2. domain name is required with dot, as described in the Alan's post.

@maksek sorry, I had to delete all my m2 project and start again in m1.9 , dont have the project anymore.

Is there any update on this?

[2017-01-26 02:26:58] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE8_4e13260053f56644d576f1e487266f9a1 and handles default, checkout_cart_index: Please correct the XML data and try again.  [] []
[2017-01-26 02:26:59] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE8_40a98983867a1770682b48d9a0ad63441 and handles 1column: Please correct the XML data and try again.  [] []
[2017-01-26 02:26:59] main.CRITICAL: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2017-01-26 02:26:59] main.CRITICAL: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2017-01-26 02:26:59] main.CRITICAL: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2017-01-26 02:26:59] main.CRITICAL: Broken reference: the 'checkout.cart.item.renderers.gift-card.actions.gift_options' element cannot be added as child to 'checkout.cart.item.renderers.gift-card.actions', because the latter doesn't exist [] []
[2017-01-26 02:26:59] main.CRITICAL: Broken reference: the 'checkout.cart.item.renderers.gift-card.actions.gift_options' tries to reorder itself towards '', but their parents are different: 'checkout.cart.item.renderers.gift-card.actions' and '' respectively. [] []
[2017-01-26 02:26:59] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE8_46f1b068ec7ccf4878f9284dd1137afd1 and handles /catalog_product_prices: Please correct the XML data and try again.  [] []

Magento 2.1.3 - Developer mode. Having strange behaviour with minicart dropdown not being initialized. Don't know if it's related.

the last update about it is: no one cares! go back to Magento 1.9

Thanks for report, its known issue
I've linked this GitHub issue to internal ticket MAGETWO-42812

Always worked like that within my recollection...

There is a mechanism implemented by me to solve this problem: https://github.com/magento/magento2/blob/develop/dev/tests/integration/framework/Magento/TestFramework/ErrorLog/Listener.php#L93

So, all you need to solve this problem once and for all is:

  • activate this mechanism on CI
  • eliminate all critical errors
  • do not deactivate mechanism on CI so that bad code is nevermore contributed to mainline :)

Changed log level from critical to info by PR: https://github.com/magento/magento2/pull/9092

Internal ticket to track issue progress: MAGETWO-67523

Was this page helpful?
0 / 5 - 0 ratings