-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Fix issue 27162 sort order link incorrect compare #27340
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
Fix issue 27162 sort order link incorrect compare #27340
Conversation
Hi @mrtuvn. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
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.
Nice catch!
Could you provide very basic unit test for that?
@lbajsarowicz ok i will check with fail tests |
@lbajsarowicz updated changes with test unit |
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.
OK, so that means we have Unit Tests covering that feature :-)
✔️ Thank you for your contribution.
Hi @lbajsarowicz, thank you for the review.
|
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.
Hi @mrtuvn.
Your changes work, but an order of all links in the navigation menu was changed
Expected Result:
✔️ order of links on mainline
Maybe you should sort the links in the right order?
@mrtuvn @lbajsarowicz Could you take a look?
Thanks!
Pull Request state was updated. Re-review required.
@engcom-Alfa yes this because sort order defined in layout xml. I believe current the order of My account link is highest value |
hi guys any news on this |
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.
Code looks fine. We need confirmation from QA team if no side effects were introduced.
Hi @mrtuvn, thank you for your contribution! |
Hello @ihor-sviziev This PR has been reverted due to a regression bug found during testing of 2.4.1 Short info from the report:
Actual Result - link positions are mixed up in b2bExpected result - link positions are proper in b2b and ee editions.Aditional Comment
|
@sdzhepa Please consider that it's not a personal preference, but consistency across the platform. Every single place should be consistent with each another and These changes were performed for consistency purposes and if Magento Commerce employees do not follow the changes to adjust the commercial platform, maybe it's time for them to review what is going on with Magento Core (Open Source)? |
why not update order in other b2b or ee modules. I don't think revert code for fix is the good way |
@sdzhepa how can having a reversed sort order in customer navigation be not a defect? This looks like a lazy move to ensure backward compatibility with modules that accepted that situation instead of raising an issue when their maintainers faced it. And considering that the modules you are trying to preserve are modules maintained by the core contributor teams (EE and B2B editions), it looks like a big conflict of interest situation when EE and B2B developers are considered as first-class citizen and CE ones are considered secondary. There is a bug here. It needs to be fixed. And EE and B2B cores need to be fixed accordingly. |
@ericmorand I'm afraid this can take time and much more effort. Since I think a lot a code depend on this. One you changed on this you must change other place. Core team has reverted my commit to previously |
@mrtuvn , I know. This is easy to fix on our side, but the way this issue is handled doesn't cast a glorious light over Magento 2 core maintainers. There is a bug here, you fixed it, and they refused it because it created issues on their side because they used a buggy implementation in the past instead of fixing it as soon as they noticed it. In other words: they force everybody else in the world to fix that issue in their custom code so that they don't have the burden of fixing it on their side. It's a lack of respect to their community. |
Hi @ericmorand, Unfortunately such change will break not the only b2b or ee extensions , but a lot of custom extensions developed by other people. If this change will be accepted, even to 2.5 (as it breaks at least some extensions - it's backward incompatible change) - all extensions that will be affected this change will need to be fixed. There wouldn't be an easy way to fix it both for new version and not breaking compatibility for earlier versions, so the only way will be preparing separate version of extension specially for 2.5 and above. That's not the thing that everybody expects from Magento with their backward compatibility policy. In case if you have any idea to make this change not so destructive - please let us know. |
@ihor-sviziev , I get your point but why is including a breaking change a problem with this specific issue but not a problem for all the previous releases of Magento 2 that included breaking changes? Don't look any further than 2.4.1. It comes with breaking changes that force everybody to test their code and potentially change them. I would totally agree with you if you were able to point me to the discussions that validated the breaking changes of 2.4.1. Or all other previous releases that included some breaking changes - and there are many of them. I'm entitled to my opinion: when core maintainers think it's more comfortable for them to include some breaking changes, they have no remorse including them even in patch releases. When they think it's less comfortable for them - like our current case - they refuse perfectly valid PRs. I may be wrong of course. But that's how it looks like from that side of the project. So my proposal is : release 2.4.2 that fixes this issue and create a breaking change. Like you did with 2.4.1. |
@ericmorand For instance in case of this PR it looked to me ok to accept such change, but it broke some magento commerce extensions. That’s basically good that it was catched before release. I don’t really know why exactly some backward incompatible changes are getting merged to core and includes into patch versions, maybe that was some security issue behind, maybe some other reason, maybe just that case wasn’t noticed. Would be good if you could provide some examples, so we as a community maybe could analyze them and write some automated tests in order to prevent similar cases in future. Again, if you know how we can make changes from this PR backward compatible - please let me know, we’ll just accept such a pull request as a replacement to this one |
@ihor-sviziev Magento 2 maintainers create breaking change release deliberately: https://devdocs.magento.com/guides/v2.4/release-notes/backward-incompatible-changes/index.html https://devdocs.magento.com/guides/v2.4/release-notes/backward-incompatible-changes/reference.html Just for the two latest releases. I let you check the previous ones. So it is not unnoticed. Why is this PR which also create a breaking change not treated with as much indulgence as a core PR that creates a breaking change ? |
Hi @ericmorand, Currently I have quite strong feeling that we should not accept such change due to inability to make these changes backward compatible. Could you contact me in Slack and we'll discuss it more detailed? |
I'm ok with approving this for 2.5.0 but not for 2.4.2. The first one is a major release and it is expected things to break, the second one is a minor release and even though Magento always seem to ship with small backwards incompatible breaking things in minor releases (especially on the frontend), we should really try to prevent this as much as possible, I already have to spend way too much time on such minor/"easy" upgrades (which are never really easy). |
@ihor-sviziev @hostep @ericmorand @mrtuvn We've discussed this issue at our Public Triage Meeting (look at our community calendar for participate), as suggested by other contributors it makes sense to target such changes to the next minor release. We also need to provide an appropriate fix to EE and B2B repositories. Thanks for highlight and discuss it. |
@mrtuvn could you recreate pr with the same changes? |
@gabrieldagama thanks a lot, it's great news. |
@gabrieldagama : just to clarify, by "minor" you mean 2.X.0 right? In my opinion we should speak about major versions in this case, the 2 is just a marketing version without any meaning.
|
@hostep yes, for sure, it should be included in 2.5.0 |
Description (*)
Previously sortOrder number of links not working as aspect. Lower number mean start first. Higher number will stay at last. Seem issue caused by previous changes. Just correct it again
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
After this changes can make order of some links in customer navigation account changed
Contribution checklist (*)