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?

3
  • What is your override path? Commented Jul 7, 2017 at 9:14
  • Magento_Theme/page_layout/override/base/2colums-left.xml Commented Jul 7, 2017 at 9:16
  • 2
    I had the same problem and looking for a solution, I found this: github.com/magento/magento2/issues/3507 in the last comment okorshenko said that this error will be solved in the release 2.2 and in this link github.com/magento/magento2/pull/9092 change log level from critical to info. Commented Jul 7, 2017 at 9:21

1 Answer 1

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 and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.