Remove unnecesary "header" block redeclaration#18772
Remove unnecesary "header" block redeclaration#18772magento-engcom-team merged 2 commits intomagento:2.3-developfrom samuel27m:2.3-develop
Conversation
Remove unnecesary header block redeclaration on Magento Luma Theme, which made impossible to set the header template through custom modules. Example: - Create new module. - Create new default.xml and try to use referenceBlock to set the template. - Doesn't work, because Luma theme XML files are compiled after all modules and overrides the custom module modifications. Removed because this block was already created in module Magento_Theme, so this redeclaration is just unnecesary
Remove unnecesary "header" block redeclaration
|
Hi @samuel27m. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
|
@magento-engcom-team give me test instance |
|
Hi @samuel27m. Thank you for your request. I'm working on Magento instance for you |
|
Hi @samuel27m, here is your new Magento instance. |
|
As you can see on the created instance, "header" block is still there and working fine. This redeclaration of the block for the Luma theme is unnecessary. |
|
Hi @miguelbalparda, thank you for the review. |
|
@samuel27m thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository. |
|
@magento-engcom-team Accepted the invitation. Thanks |
|
@miguelbalparda We could backport this fix to the 2.2-develop branch, should I do that myself? |
|
All yours @samuel27m, thanks for the help!!! |
|
Hi @samuel27m. Thank you for your contribution. |
Description (*)
Removed because the "header" block was already created in module Magento_Theme, so this redeclaration is just unnecesary
Fixed Issues (if relevant)
None found on the Magento 2 issues
Manual testing scenarios (*)
Create new module.
Create new default.xml and try to use referenceBlock to set the template. Example:
<referenceBlock name="header"> <arguments> <argument name="template" xsi:type="string">Samuel27m_Welcome::html/header.phtml</argument> </arguments> </referenceBlock>Doesn't work, because Luma theme XML files are compiled after all modules and overrides the custom module modifications.
Contribution checklist (*)