2

I have overwritten the 2columns-left layout by positioning a container using the move action and then assign the order in one of the containers.

<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
<update handle="1column"/>
<move element="main" destination="columns.inner" before="-" />
<referenceContainer name="columns">
    <container name="columns.inner" htmlTag="div" htmlClass="columns-inner" before="-">
        <container name="div.sidebar.main" htmlTag="div" htmlClass="sidebar sidebar-main" after="main">
            <container name="sidebar.main" as="sidebar_main" label="Sidebar Main"/>
        </container>
        <container name="div.sidebar.additional" htmlTag="div" htmlClass="sidebar sidebar-additional" after="div.sidebar.main">
            <container name="sidebar.additional" as="sidebar_additional" label="Sidebar Additional"/>
        </container>
    </container>
</referenceContainer>

This throws the following error in system.log.

main.CRITICAL: Broken reference: the 'div.sidebar.main' tries to reorder itself towards 'main', but their parents are different: 'columns.inner' and 'columns' respectively. [] []

I guess it's because the move action is the last action in queue when rendering.

How can I remove this error?. Can I change the order of the rendering actions?

4

This is an acknowledge issue of Magento 2.1, basically it is not an ERROR at all.

https://github.com/magento/magento2/issues/5627

This pull request will fix the problem: https://github.com/magento/magento2/pull/9092

It will change the log level from CRITICAL to INFO. There is nothing to worry about these logs at all, your site will works fine.

Hope it helps :)

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.