Skip to content

cms-page-specific layouts are not applied if FullActionName differs from page_view #26758

Closed
@Tripuls-Magento

Description

@Tripuls-Magento

Preconditions (*)

  1. magento 2.3.4
  2. create cms-specificlayout file in your module/theme for home

Steps to reproduce (*)

  1. Add a cms_page_view_selectable_home_somechanges.xml as described in https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/xml-manage.html
  2. Edit the home page in the backend to use the specifc Layout (CMS->Pages->home>edit->design->select "somechanges" ..)
  3. Save.
  4. Clear layout-cache
  5. Refresh home page

Expected result (*)

  1. Specific layout changes from cms_page_view_selectable_home_somechanges.xml should be applied

Actual result (*)

  1. Changes have no effect

Workaraund:

Place a second file cms_index_index_selectable_home_somechanges.xml in your theme/module and the changes are applied.

Backgraund:

The DefaultLayoutHandle differs on the homepage from regular CMS_Page_View, since the full action name is cms_index_index
\Magento\Framework\View\Result\Page::addPageLayoutHandles
(\Magento\Framework\View\Result\Layout::getDefaultLayoutHandle)

Metadata

Metadata

Assignees

Labels

Component: CmsFixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReported on 2.3.4Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions