4

My Magento installation behaves weird. Sidebar main and sidebar additional do not display on the same level as column main as it should but Magento layout engine moves them under the column main. I tried everything and so far I do not know why.

Wrong layout

Sidebars wrong

Correct layout

Sidebars correct

My corresponding layout xml is

    <body>
    <referenceContainer name="sidebar.main">
        <block class="Magento\Cms\Block\Block" name="sidebar-products" after="-">
            <arguments>
                <argument name="block_id" xsi:type="string">sidebar-products</argument>
            </arguments>
        </block>
    </referenceContainer>
    <referenceContainer name="sidebar.additional">
        <block class="Magento\Cms\Block\Block" name="sidebar-partners" after="-">
            <arguments>
                <argument name="block_id" xsi:type="string">sidebar-partners</argument>
            </arguments>
        </block>
    </referenceContainer>
    <referenceBlock name="view.addto.compare" remove="true"/>
    <move element="content.aside" destination="page.bottom.container" as="related_stuff"/>
    <move element="product.info" destination="content" after="product.info.media" />
    <move element="product.info.social" destination="product.info.options.wrapper.bottom" after="-" />
</body>

I have searched in my theme folder for layout updates or any files containing "sidebar" but nothing has come up.

Any ideas where I should check where the layout engine gets these wrong instructions?

Oh, And I also have tried with my own empty.xml but no success :(

  • First check are you using layout type as layout="2columns-left" or layout="2columns-right"or not in=f no than first make it like this in your xml files & check it into your backend also into the design section for the design changes! – Abhishek Tripathi Dec 24 '17 at 7:04
  • I'm using 2columns-right. – Sander Vallaots Dec 24 '17 at 9:36
  • Oh, and I discovered that when I open the product from the product list the engine renders the page with the wrong layot. When I open the product from the shopping cart by clicking the "Edit" link (pencil icon) the page renders correctly. Both pages use the same layout xml (the snippet above) catalog_product_view.xml from Magento_Catalog – Sander Vallaots Dec 24 '17 at 9:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.