Open
Description
Summary
Preconditions
- Magento versions 2.4.5+
- Module "module-async-order" in a vendor (v100.4.1)
Steps to reproduce
- Create a file
sales_order_history.xml
in your project. - Set your custom template in this file
<referenceBlock name="sales.order.history" template="Magento_Sales::order/custom-history-template.phtml" />
- Update Magento to v2.4.5+
Expected result
Sales history page use my custom template.
Actual result
Layout use template from Magento_AsyncOrder module because <action method="setTemplate">
has higher priority than <referenceBlock template="...."...
Examples
File: vendor/magento/module-async-order/view/frontend/layout/sales_order_history.xml
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="sales.order.history">
<action method="setTemplate">
<argument name="template" xsi:type="string">Magento_AsyncOrder::order/history.phtml</argument>
</action>
</referenceBlock>
</body>
</page>
Proposed solution
Replace
<referenceBlock name="sales.order.history">
<action method="setTemplate">
<argument name="template" xsi:type="string">Magento_AsyncOrder::order/history.phtml</argument>
</action>
</referenceBlock>
with
<referenceBlock name="sales.order.history" template="Magento_AsyncOrder::order/history.phtml" />
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Metadata
Assignees
Labels
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmedA defect with this priority could have functionality issues which are not to expectations.Indicates original Magento version for the Issue report.The issue has been reproduced on latest 2.4-develop branchIssue related to Developer Experience and needs help with Triage to Confirm or Reject it
Activity