Description
This issue is automatically created based on existing pull request: #30370: fix conflict for logo_height argument by default.xml
Description (*)
For a new theme, for example child of luma, if you want change the logo by default.xml and set also his size by the height, you should write this:
<referenceBlock name="logo"> <arguments> <argument name="logo_file" xsi:type="string">images/logo.png</argument> <argument name="logo_height" xsi:type="number">300</argument> </arguments> </referenceBlock>
Now the problem is that it doesn't works, because there is a conflict with the line 151 of _module.less:
The result is that our rule is overwritten:
It doesn't happen with Width.
Sometime we want set the image by height and not by the width... or maybe with both... why not? It's your choice.
So for now the logo_height have no sense to exist.
The height: auto should be deleted and all will work fine.
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
-
Magento 2.4-develop
-
Create a new theme child of Luma
-
Create the default.xml and copy this:
<referenceBlock name="logo"> <arguments> <argument name="logo_file" xsi:type="string">images/logo.png</argument> <argument name="logo_height" xsi:type="number">300</argument> </arguments> </referenceBlock>
-
Put your custom logo.png inside the images folder.
-
Save and delete the cache
-
Refresh the page
Questions or comments
Contribution checklist (*)
- Pull request has a meaningful description of its purposeAll commits are accompanied by meaningful commit messagesAll new or changed code is covered with unit/integration tests (if applicable)All automated tests passed successfully (all builds are green)
Activity
m2-assistant commentedon Dec 9, 2020
Hi @krishprakash. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇
1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
Details
If the issue has a valid description, the labelIssue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until labelIssue: Format is valid
appears.2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add
Issue: Clear Description
label to the issue by yourself.3. Add
Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.4. Verify that the issue is reproducible on
2.4-develop
branchDetails
- Add the comment@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.- If the issue is reproducible on
2.4-develop
branch, please, add the labelReproduced on 2.4.x
.- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
5. Add label
Issue: Confirmed
once verification is complete.6. Make sure that automatic system confirms that report has been added to the backlog.
magento-engcom-team commentedon Dec 9, 2020
✅ Confirmed by @krishprakash
Thank you for verifying the issue. Based on the provided information internal tickets
MC-39781
were createdIssue Available: @krishprakash, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
magentoexpert commentedon Jan 24, 2021
This is not a solution and it does not work with Magento 2.4.1 installed with composer. The folder structure is completely different
The folder structure: /app/design/frontend/Magento is empty and obsolete
From Admin / Content / Configuration/ / Header you can set the width and height of the logo but this is not reflected on the front end.
Creating the .xml file as suggested above has no effect whatsoever