{"data":{"id":"magento2-40871","source":"github-pr","sourceRef":"magento/magento2#40871","title":"Minicart cannot be used twice in the same page","pr":{"number":40871,"url":"https://github.com/magento/magento2/pull/40871","author":"aasim110","mergedAt":"2026-08-14T09:28:43Z","mergeCommit":"4b1633a74ca1b914494a2f192fbc5bde0aa8a0ce","headCommit":"862a197707aa63d669c1e8e3e4bd02d9233f2765","baseRef":"2.4-develop","diffSha256":"8a594b9ec8862c98761ecff5a30e9fe78af2590bfe5c4850f813c7c96926e43e"},"issues":[{"number":38958,"url":"https://github.com/magento/magento2/issues/38958","title":"Minicart cannot be used twice in the same page","labels":["Area: UI Framework","Component: UiComponents","Issue: Confirmed","Priority: P2","Progress: PR Created","Progress: done","Reported on 2.4.x","Reproduced on 2.4.x","Triage: Dev.Experience"],"kind":"human"}],"fixedIn":null,"containingTags":[],"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":"clean","2.4.8-p1":"clean","2.4.8-p2":"clean","2.4.8-p3":"clean","2.4.8-p4":"clean","2.4.8-p5":"clean","2.4.9":"clean"},"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","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"],"components":["magento/module-checkout"],"files":[{"path":"app/code/Magento/Checkout/Block/Cart/Sidebar.php","change":"modified","package":"magento/module-checkout"},{"path":"app/code/Magento/Checkout/view/frontend/templates/cart/minicart.phtml","change":"modified","package":"magento/module-checkout"},{"path":"app/code/Magento/Checkout/view/frontend/web/js/sidebar.js","change":"modified","package":"magento/module-checkout"},{"path":"app/code/Magento/Checkout/view/frontend/web/js/view/minicart.js","change":"modified","package":"magento/module-checkout"}],"stripped":{"tests":["app/code/Magento/Checkout/Test/Unit/Block/Cart/SidebarTest.php","dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/sidebar.test.js","dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/view/minicart.test.js"],"docs":[],"outsideCode":[]},"linesChanged":308,"mergeBatched":false,"excluded":null,"sections":{"description":null,"stepsToReproduce":null,"expectedResult":null,"actualResult":null,"source":null},"signatures":[],"labels":{"area":["UI Framework"],"component":["UiComponents"],"priority":"P2","severity":null,"reportedOn":["2.4.x"]},"categories":[],"triage":{"model":"@cf/cloudflare/clef","requestHash":"214217c73800767e503abf549fa2e9ed59f54011e8354428f6208cfeb24f064c","isBugfix":0.9182,"changeKind":{"choice":"bugfix","probabilities":{"bugfix":0.8496,"feature":0.0743,"refactor":0.062,"tests_only":0.0068,"docs_only":0.003,"dependency":0.0043},"confidence":0.6775},"scope":{"score":1.4108,"probabilities":{"0":0.1097,"1":0.3699,"2":0.5204},"confidence":0.1296},"risk":{"score":1.1657,"probabilities":{"0":0.104,"1":0.6263,"2":0.2697},"confidence":0.2137},"area":{"choice":"checkout","probabilities":{"catalog":0.0048,"checkout":0.5143,"customer":0.0054,"admin":0.0105,"graphql_api":0.003,"framework":0.0242,"frontend":0.4292,"other":0.0086},"confidence":0.3709},"securityRelevant":0.0078,"reportedVersion":{"choice":"unspecified","probabilities":{"2.4.0":0.0041,"2.4.0-p1":0.0039,"2.4.1":0.0041,"2.4.1-p1":0.0034,"2.4.2":0.0059,"2.4.2-p1":0.0047,"2.4.2-p2":0.0062,"2.4.3":0.0085,"2.4.3-p1":0.0071,"2.4.3-p2":0.0084,"2.4.3-p3":0.0062,"2.4.4":0.01,"2.4.4-p1":0.0069,"2.4.4-p10":0.0059,"2.4.4-p11":0.007,"2.4.4-p12":0.0062,"2.4.4-p13":0.0059,"2.4.4-p14":0.0066,"2.4.4-p15":0.0053,"2.4.4-p16":0.0063,"2.4.4-p17":0.0061,"2.4.4-p18":0.0045,"2.4.4-p2":0.0029,"2.4.4-p3":0.0028,"2.4.4-p4":0.0033,"2.4.4-p5":0.0037,"2.4.4-p6":0.0041,"2.4.4-p7":0.0038,"2.4.4-p8":0.0041,"2.4.4-p9":0.0035,"2.4.5":0.0125,"2.4.5-p1":0.0096,"2.4.5-p10":0.0078,"2.4.5-p11":0.0112,"2.4.5-p12":0.0092,"2.4.5-p13":0.0079,"2.4.5-p14":0.0081,"2.4.5-p15":0.0064,"2.4.5-p16":0.0074,"2.4.5-p17":0.007,"2.4.5-p2":0.0036,"2.4.5-p3":0.0053,"2.4.5-p4":0.0051,"2.4.5-p5":0.0042,"2.4.5-p6":0.0055,"2.4.5-p7":0.0052,"2.4.5-p8":0.005,"2.4.5-p9":0.005,"2.4.6":0.0247,"2.4.6-p1":0.015,"2.4.6-p10":0.0126,"2.4.6-p11":0.013,"2.4.6-p12":0.0116,"2.4.6-p13":0.01,"2.4.6-p14":0.0115,"2.4.6-p15":0.0094,"2.4.6-p2":0.0048,"2.4.6-p3":0.0077,"2.4.6-p4":0.0069,"2.4.6-p5":0.0069,"2.4.6-p6":0.0078,"2.4.6-p7":0.0089,"2.4.6-p8":0.0064,"2.4.6-p9":0.0067,"2.4.7":0.0267,"2.4.7-p1":0.0165,"2.4.7-p10":0.0132,"2.4.7-p2":0.0088,"2.4.7-p3":0.0151,"2.4.7-p4":0.0148,"2.4.7-p5":0.0126,"2.4.7-p6":0.0143,"2.4.7-p7":0.0126,"2.4.7-p8":0.0137,"2.4.7-p9":0.0075,"2.4.8":0.0432,"2.4.8-p1":0.0233,"2.4.8-p2":0.0211,"2.4.8-p3":0.0184,"2.4.8-p4":0.0169,"2.4.8-p5":0.0141,"2.4.9":0.0211,"unspecified":0.2348},"confidence":0.0543},"backportWorthy":{"score":0.9768,"probabilities":{"0":0.2844,"1":0.4544,"2":0.2612},"confidence":0.0334}},"curated":{"title":"Fixes minicart not working when it is rendered twice on the same storefront page","description":"Using a minicart block twice on the same page, such as a minicart in the footer next to the header minicart, does not work. The change adds dynamic data_block_name and scope parameters to the minicart template, makes the dropdown and sidebar selectors relative to each block, and the Sidebar block getJsLayout() now adds the item renderers of the main minicart to secondary minicarts.","categories":[],"author":"claude-code/opus-5.5","date":"2026-10-06","reviewedBy":null},"tests":{"2.4.8-p5":{"before":"not-runnable","after":"pass","adapted":false,"runAt":"2026-10-06T09:20:30.466Z","releaseCommit":"870a22c63d9d9b68fa3297962e2d5d5841115814","suites":{"unit":{"before":"not-runnable","after":"pass","runAt":"2026-10-06T09:20:30.466Z"}}},"2.4.9":{"before":"not-runnable","after":"pass","adapted":false,"runAt":"2026-10-06T09:20:30.196Z","releaseCommit":"755e34dd689021c5165db9d35ecff74f7dc51527","suites":{"unit":{"before":"not-runnable","after":"pass","runAt":"2026-10-06T09:20:30.196Z"}}},"2.4.7-p10":{"before":"not-runnable","after":"pass","adapted":false,"runAt":"2026-10-06T09:29:35.825Z","releaseCommit":"72561bf80652f57cc642a03e2c9a51d74a285b14","suites":{"unit":{"before":"not-runnable","after":"pass","runAt":"2026-10-06T09:29:35.825Z"}}}}},"_documentation":"https://magento.watch/api","_description":"Upstream fix magento2-40871 details"}