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

    <referenceContainer name="sidebar.main">
        <block class="Magento\Cms\Block\Block" name="sidebar-products" after="-">
                <argument name="block_id" xsi:type="string">sidebar-products</argument>
    <referenceContainer name="sidebar.additional">
        <block class="Magento\Cms\Block\Block" name="sidebar-partners" after="-">
                <argument name="block_id" xsi:type="string">sidebar-partners</argument>
    <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="-" />

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
  • Validate you HTML, I had the same issue, then found out there was a div tag without a closing div. Adding </div> fix the issue in my case. Remember, Chrome try to be smart and close divs for you, which will mess up the page structure. – Thanu Feb 10 at 4:05

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.