cancel
Showing results for 
Search instead for 
Did you mean: 

How is this admin broken reference possible? What could possibly be wrong upstream>

How is this admin broken reference possible? What could possibly be wrong upstream>

I get this in the system log, 

 

[2019-01-21 17:41:47] main.INFO: Broken reference: the 'notification.messages' tries to reorder itself towards 'user', but their parents are different: 'header.inner.right' and 'header' respectively. [] []

I run this find -> grep, 

 

find app vendor/ -type f -name "default.xml" | xargs -I '{}' grep -H notification.messages '{}'
vendor/magento/module-admin-notification/view/adminhtml/layout/default.xml: <block class="Magento\AdminNotification\Block\ToolbarEntry" name="notification.messages" before="user" template="Magento_AdminNotification::toolbar_entry.phtml"/>
vendor/magento/theme-adminhtml-backend/Magento_Backend/layout/default.xml: <move element="notification.messages" after="user" destination="header.inner.right" />

and this one, 

 

find app vendor/ -type f -name "default.xml" | xargs -I  '{}' grep -H header.inner.right '{}'
vendor/magento/theme-adminhtml-backend/Magento_Backend/layout/default.xml:            <container name="header.inner.right" after="header.inner.left" htmlTag="div" htmlClass="page-header-actions col-l-4 col-m-6"/>
vendor/magento/theme-adminhtml-backend/Magento_Backend/layout/default.xml:        <move element="user" before="-" destination="header.inner.right" />
vendor/magento/theme-adminhtml-backend/Magento_Backend/layout/default.xml:        <move element="notification.messages" after="user" destination="header.inner.right" />
vendor/magento/theme-adminhtml-backend/Magento_Backend/layout/default.xml:        <move element="global.search" destination="header.inner.right" />

WHAT IS GOING ON?  First all these are in upstream, second are they even incorrect?  If not what could possibly cause this bug? 

 

2 REPLIES 2

Re: How is this admin broken reference possible? What could possibly be wrong upstream>

It really depends on the order of loaded layout files. So if app/etc/config.php we have:

 

'Magento_AdminNotification' => 1,
'Magento_Backend' => 1, 

 

the error happens, but if Magento_Backend presents earlier then Magento_AdminNotification:

 'Magento_Backend' => 1, 
'Magento_AdminNotification' => 1, 

all is good. So in the first case, magento tries to order elements when the layout with sibling "header" isn't processed yet.

Re: How is this admin broken reference possible? What could possibly be wrong upstream>

@npuchkoado8ede sorry this does not solve the issue in the op, currently on latest version this issue presents itself no matter which order those 2 modules are in and actually the setup upgrade process automatically reorders those modules in the config.php anyways.