Skip to content

Layout shouldn't be set in a page_layout xml file. #537

Open
@jasperzeinstra

Description

@jasperzeinstra

Preconditions (*)

  1. Magento Page Builder version >= 1.3.0

Steps to reproduce (*)

  1. Create a Magento_Catalog/layout/catalaog_category_view.xml in your theme.
  2. Set the attribute layout of the xml-node page to 1column

Expected result (*)

  1. Category page has layout one column

Actual result (*)

  1. Category page has layout two columns left

This issue is caused by the file view/frontend/page_layout/catalog_category_view.xml. A page_layout file should never set a layout becasue they are the last loaded layout xml files. This bug overwrites the value for layout set in the theme.

This is the patch that resolves the issue. I don't have a paid GitHub account, so can't create a PR.

===================================================================
--- a/view/frontend/page_layout/catalog_category_view.xml	(date 1592218590076)
+++ b/view/frontend/page_layout/catalog_category_view.xml	(date 1592218590076)
@@ -5,7 +5,7 @@
  * See COPYING.txt for license details.
  */
 -->
-<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
+<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
     <body>
         <referenceContainer name="category.view.container">
             <referenceBlock name="category.description" template="Magento_PageBuilder::catalog/category/view/description.phtml"/>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions