-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed issue where removing breadcrumbs removes the page title #29437
base: 2.4-develop
Are you sure you want to change the base?
Conversation
Hi @realchriswells. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
@magento run all tests |
@magento run Static Tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, cannot reproduce this issue on the 2.4-develop branch.
Steps:
- Create a custom module
- Use
catalog_product_view.xml
and add<referenceBlock name="breadcrumbs" remove="true"/>
- Check the product details page
Result:
- No breadcrumbs on the page
<title>
tag is present and contains a correct value
Hi @rogyar Apologies, this just seems to affect the category pages. Please try the updated steps to replicate below. The steps I took to replicate the issue were:
|
Hi, @realchriswells. Thanks for the clarification. I'm able to reproduce it for the category view page with breadcrumbs block removed in the XML layout. I've double-checked the original PR and looks like the changes were not ported to 2.2/2.3 for some reason. Frankly speaking, the fix looks like an "ad-hoc" solution. But, on the other hand, taking the page title from breadcrumbs (the current solution) is even more questionable. I believe it has been implemented in this way for a reason, so let's leave it as it is. According to the definition of done, all changes should be covered by autotests. I would ask you to provide a simple test for this case. You may extend the existing test magento2/dev/tests/integration/testsuite/Magento/Catalog/Block/BreadcrumbsTest.php Line 56 in f4db7d4
You may remove the breadcrumbs block using Thank you! |
@magento create issue |
@realchriswells I am closing this PR now due to inactivity. |
Hi @realchriswells, thank you for your contribution! |
I wish to continue with this. |
@engcom-Charlie @rogyar |
Hi @realchriswells. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, review the Magento Contributor Guide documentation. |
@magento run all tests |
@rogyar Is it possible you or someone else on here could help me out with writing the tests, I'm out of my depth on those. |
The other day there was a post on here confirming that a manual test was completed and accepted, but then it disappeared. |
@@ -4,6 +4,8 @@ | |||
* See COPYING.txt for license details. | |||
*/ | |||
|
|||
// @codingStandardsIgnoreFile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, don't use this annotation. Even if this page contains some legacy approaches, they should be visible.
On the other hand, I see that some of your edits contain changes that don't meet the PSR coding standards (line length exceeds 120 chars). Please, remove this annotation and run the static tests once again.
Thank you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've done this now, and fixed the PSR coding standards issue you referenced.
As of now it is passing all tests bar the Functional Tests. What needs to be done next?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By adding this directive you don't "fix" the coding standard issues but tell the system to ignore them :)
Using such directives is not allowed in most cases (including this one). If there are failing static tests, every issue that causes the failing test should be addressed by adjusting the code for meeting the standards.
Thank you.
@magento run Static Tests |
@magento run all tests |
@rogyar This seems to have stalled. Are you able to tell me where things need to be to get this over the line? |
Hi @realchriswells as we have discussed in Slack, the auto-test coverage is still required. |
@magento run all tests |
Description (*)
There was an issue in the 2.1 branch where if you removed the breadcrumbs via XML:
<referenceBlock name="breadcrumbs" remove="true" />
, the page title would also be removed, leaving behind empty<title>
tags in the<head>
. This fixed in the 2.1 branch, but it seems that some regression has occurred and it is back. I'm reapplying that code change.Related Pull Requests
The original PR is here.
Manual testing scenarios (*)
Contribution checklist (*)
Resolved issues: