Skip to content

Fix page layout xml of pagebuilder overriding the layout set by theme#906

Open
GrimLink wants to merge 1 commit intomagento:developfrom
GrimLink:bugfix/forced-layout-in-catalog_category_view
Open

Fix page layout xml of pagebuilder overriding the layout set by theme#906
GrimLink wants to merge 1 commit intomagento:developfrom
GrimLink:bugfix/forced-layout-in-catalog_category_view

Conversation

@GrimLink
Copy link
Copy Markdown
Member

@GrimLink GrimLink commented Apr 5, 2026

Description (*)

This Pull Request removes the hardcoded layout attribute from Magento/PageBuilder/view/frontend/page_layout/catalog_category_view.xml.

Since the Magento 2.4.6-p3, this attribute forces a specific layout, making it impossible for custom themes to override the category page layout via their own XML files. Removing this attribute restores the expected layout inheritance and allows theme-level overrides to function correctly.

Fixed Issues (if relevant)

  1. layout 2 columns left avoid to override layout on catalog_category_view #829: Cannot override category layout in custom theme since 2.4.6-p3
  2. page layout xml of pagebuilder override the layout set by theme magento2#38473: Layout set in Magento_PageBuilder overriding layout set by theme

Related Pull Requests

Manual testing scenarios (*)

  1. Install a Magento instance (version 2.4.6-p3 or newer) with PageBuilder enabled.
  2. Create or use a custom frontend theme.
  3. In the custom theme, create a layout override: app/design/frontend/[Vendor]/[Theme]/Magento_Catalog/layout/catalog_category_view.xml.
  4. Define a specific layout in that file (e.g., <page layout="1column" ...>).
  5. Flush the cache and view a category page on the storefront.
  6. Result (Pre-fix): The category page ignores the theme setting and sticks to the PageBuilder-defined layout.
  7. Result (Post-fix): The category page correctly honors the layout defined in the custom theme.

Questions or comments

N/A

Checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

To allow layout overrides from Theme and Admin Config
@GrimLink
Copy link
Copy Markdown
Member Author

GrimLink commented Apr 5, 2026

@magento run all tests

Copy link
Copy Markdown
Collaborator

@engcom-Hotel engcom-Hotel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @GrimLink,

Thank you for the report and collaboration!

The changes looks good to us, but please cover the changes with some automated test in accordance to the DOD.

Also fix the static test failure.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

layout 2 columns left avoid to override layout on catalog_category_view

2 participants