{"data":{"id":"magento2-30070","source":"github-pr","sourceRef":"magento/magento2#30070","title":"Pass custom attributes to current link via XML","pr":{"number":30070,"url":"https://github.com/magento/magento2/pull/30070","author":"mattkrupnik","mergedAt":"2024-10-18T16:54:12Z","mergeCommit":"4267628778eecd26f3c89f236963e0aab77a8783","headCommit":"3debd1a3485f8eb783e8b9ce035ee196e7665301","baseRef":"2.4-develop","diffSha256":"e3ad4542545d74c9c0d6f08feef4ac737d8c1a239618a90cd293ca0df291f142"},"issues":[{"number":38500,"url":"https://github.com/magento/magento2/issues/38500","title":"[Issue] Pass custom attributes to current link via XML","labels":["Area: Framework","Component: View","Issue: Confirmed","Priority: P3","Progress: done","Reported on 2.4.x","Reproduced on 2.4.x","Severity: S3","Triage: Dev.Experience"],"kind":"pr-derived"}],"fixedIn":"2.4.8","containingTags":["2.4.8","2.4.8-p1","2.4.8-p2","2.4.8-p3","2.4.8-p4","2.4.8-p5","2.4.9"],"reportedOn":null,"codeMatch":{"2.4.6":"clean","2.4.6-p1":"clean","2.4.6-p2":"clean","2.4.6-p3":"clean","2.4.6-p4":"clean","2.4.6-p5":"clean","2.4.6-p6":"clean","2.4.6-p7":"clean","2.4.6-p8":"clean","2.4.6-p9":"clean","2.4.6-p10":"clean","2.4.6-p11":"clean","2.4.6-p12":"clean","2.4.6-p13":"clean","2.4.6-p14":"clean","2.4.6-p15":"clean","2.4.7":"clean","2.4.7-p1":"clean","2.4.7-p2":"clean","2.4.7-p3":"clean","2.4.7-p4":"clean","2.4.7-p5":"clean","2.4.7-p6":"clean","2.4.7-p7":"clean","2.4.7-p8":"clean","2.4.7-p9":"clean","2.4.7-p10":"clean","2.4.8":"conflict","2.4.8-p1":"conflict","2.4.8-p2":"conflict","2.4.8-p3":"conflict","2.4.8-p4":"conflict","2.4.8-p5":"conflict","2.4.9":"conflict"},"affectedVersions":["2.4.6","2.4.6-p1","2.4.6-p2","2.4.6-p3","2.4.6-p4","2.4.6-p5","2.4.6-p6","2.4.6-p7","2.4.6-p8","2.4.6-p9","2.4.6-p10","2.4.6-p11","2.4.6-p12","2.4.6-p13","2.4.6-p14","2.4.6-p15","2.4.7","2.4.7-p1","2.4.7-p2","2.4.7-p3","2.4.7-p4","2.4.7-p5","2.4.7-p6","2.4.7-p7","2.4.7-p8","2.4.7-p9","2.4.7-p10"],"components":["magento/framework"],"files":[{"path":"lib/internal/Magento/Framework/View/Element/Html/Link/Current.php","change":"modified","package":"magento/framework"}],"stripped":{"tests":[],"docs":[],"outsideCode":[]},"linesChanged":9,"mergeBatched":false,"excluded":null,"sections":{"description":"Actualy we are able to add custom attributes for links in customer account navigation via XML for example:\n```\n    <referenceBlock name=\"customer-account-navigation-account-link\">\n        <arguments>\n            <argument name=\"attributes\" xsi:type=\"array\">\n                <item name=\"class\" xsi:type=\"string\">account-custom-class</item>\n            </argument>\n        </arguments>\n    </referenceBlock>\n\n```\nBut when `customer-account-navigation-account-link` is as current page in this case it is `https://sample.com/customer/account/` our custom attribute dosn't show because method `getAttributesHtml()` [isn't used for current link](https://github.com/magento/magento2/pull/30070/commits/526b9d7e3a070870047acb37aaaf7ccff93540d1).","stepsToReproduce":null,"expectedResult":null,"actualResult":null,"source":"pr"},"signatures":[],"labels":{"area":["Framework"],"component":["View"],"priority":"P3","severity":"S3","reportedOn":["2.4.x"]},"categories":[],"triage":{"model":"@cf/cloudflare/clef","requestHash":"9c5e562f157b81b61f37622303e574dd952a2ad4052bba0be5c21a20f33d6160","isBugfix":0.8565,"changeKind":{"choice":"bugfix","probabilities":{"bugfix":0.9422,"feature":0.0337,"refactor":0.0146,"tests_only":0.0036,"docs_only":0.0026,"dependency":0.0033},"confidence":0.8668},"scope":{"score":0.4284,"probabilities":{"0":0.629,"1":0.3135,"2":0.0575},"confidence":0.2459},"risk":{"score":0.3302,"probabilities":{"0":0.689,"1":0.2918,"2":0.0192},"confidence":0.3404},"area":{"choice":"framework","probabilities":{"catalog":0.0084,"checkout":0.0046,"customer":0.1595,"admin":0.0134,"graphql_api":0.0035,"framework":0.6947,"frontend":0.1049,"other":0.011},"confidence":0.4507},"securityRelevant":0.0055,"reportedVersion":{"choice":"unspecified","probabilities":{"2.4.0":0.0044,"2.4.0-p1":0.0048,"2.4.1":0.0052,"2.4.1-p1":0.0051,"2.4.2":0.0075,"2.4.2-p1":0.0085,"2.4.2-p2":0.0108,"2.4.3":0.0123,"2.4.3-p1":0.0142,"2.4.3-p2":0.0146,"2.4.3-p3":0.0074,"2.4.4":0.0141,"2.4.4-p1":0.0103,"2.4.4-p10":0.0071,"2.4.4-p11":0.008,"2.4.4-p12":0.0066,"2.4.4-p13":0.0068,"2.4.4-p14":0.0077,"2.4.4-p15":0.0058,"2.4.4-p16":0.0069,"2.4.4-p17":0.0059,"2.4.4-p18":0.0055,"2.4.4-p2":0.0028,"2.4.4-p3":0.0031,"2.4.4-p4":0.0036,"2.4.4-p5":0.0039,"2.4.4-p6":0.0043,"2.4.4-p7":0.004,"2.4.4-p8":0.0045,"2.4.4-p9":0.004,"2.4.5":0.0134,"2.4.5-p1":0.0112,"2.4.5-p10":0.0068,"2.4.5-p11":0.0094,"2.4.5-p12":0.0081,"2.4.5-p13":0.0079,"2.4.5-p14":0.0081,"2.4.5-p15":0.0067,"2.4.5-p16":0.0071,"2.4.5-p17":0.0068,"2.4.5-p2":0.0034,"2.4.5-p3":0.0043,"2.4.5-p4":0.0047,"2.4.5-p5":0.005,"2.4.5-p6":0.0055,"2.4.5-p7":0.0065,"2.4.5-p8":0.0048,"2.4.5-p9":0.0042,"2.4.6":0.0245,"2.4.6-p1":0.0172,"2.4.6-p10":0.008,"2.4.6-p11":0.01,"2.4.6-p12":0.0091,"2.4.6-p13":0.0096,"2.4.6-p14":0.0094,"2.4.6-p15":0.0075,"2.4.6-p2":0.0047,"2.4.6-p3":0.007,"2.4.6-p4":0.0096,"2.4.6-p5":0.0067,"2.4.6-p6":0.0076,"2.4.6-p7":0.008,"2.4.6-p8":0.0064,"2.4.6-p9":0.0044,"2.4.7":0.013,"2.4.7-p1":0.0114,"2.4.7-p10":0.0075,"2.4.7-p2":0.0091,"2.4.7-p3":0.0111,"2.4.7-p4":0.013,"2.4.7-p5":0.0123,"2.4.7-p6":0.013,"2.4.7-p7":0.0104,"2.4.7-p8":0.0084,"2.4.7-p9":0.0055,"2.4.8":0.013,"2.4.8-p1":0.012,"2.4.8-p2":0.0135,"2.4.8-p3":0.0139,"2.4.8-p4":0.013,"2.4.8-p5":0.0125,"2.4.9":0.014,"unspecified":0.3101},"confidence":0.0922},"backportWorthy":{"score":1.2631,"probabilities":{"0":0.2391,"1":0.2587,"2":0.5022},"confidence":0.0644}},"curated":{"title":"Fixes custom attributes missing on the current account navigation link","description":"Custom attributes for links in customer account navigation via XML do not show when the link is the current page, because getAttributesHtml() isn't used for current link. Framework View Element Html Link Current.php now uses getAttributesHtml() for the current link too.","categories":[],"author":"claude-code/opus-5.5","date":"2026-10-06","reviewedBy":null},"tests":null},"_documentation":"https://magento.watch/api","_description":"Upstream fix magento2-30070 details"}