{"data":{"id":"magento2-39722","source":"github-pr","sourceRef":"magento/magento2#39722","title":"Block selection in widgets that have the same identifier","pr":{"number":39722,"url":"https://github.com/magento/magento2/pull/39722","author":"Mohamed-Asar","mergedAt":"2025-04-29T18:55:01Z","mergeCommit":"488f68dbbbe3827a95f1b193f032622c4565ce08","headCommit":"3dd14f9b588a401b571306df96eba707657ff7fb","baseRef":"2.4-develop","diffSha256":"281911cdfd6b4846d0c78dd7449ed3d56e604a5699db14c7f722a49df6bdd27b"},"issues":[{"number":39692,"url":"https://github.com/magento/magento2/issues/39692","title":"Block selection in widgets that have the same identifier","labels":["Area: Content / CMS","Component: Widget","Issue: Confirmed","Priority: P2","Progress: done","Reported on 2.4.7-p3","Reproduced on 2.4.x"],"kind":"human"}],"fixedIn":"2.4.9","containingTags":["2.4.9"],"reportedOn":"2.4.7-p3","codeMatch":{"2.4.6":"conflict","2.4.6-p1":"conflict","2.4.6-p2":"conflict","2.4.6-p3":"conflict","2.4.6-p4":"conflict","2.4.6-p5":"conflict","2.4.6-p6":"conflict","2.4.6-p7":"conflict","2.4.6-p8":"conflict","2.4.6-p9":"conflict","2.4.6-p10":"conflict","2.4.6-p11":"conflict","2.4.6-p12":"conflict","2.4.6-p13":"conflict","2.4.6-p14":"conflict","2.4.6-p15":"conflict","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":"conflict"},"affectedVersions":["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"],"components":["magento/module-cms"],"files":[{"path":"app/code/Magento/Cms/Block/Adminhtml/Block/Widget/Chooser.php","change":"modified","package":"magento/module-cms"}],"stripped":{"tests":["app/code/Magento/Cms/Test/Mftf/Test/AdminAddBlockWidgetToCMSPageTest.xml","app/code/Magento/Cms/Test/Unit/Block/Adminhtml/Block/Widget/ChooserTest.php"],"docs":[],"outsideCode":[]},"linesChanged":6,"mergeBatched":false,"excluded":null,"sections":{"description":"The \"Block EN\" should be displayed","stepsToReproduce":"Since the last update where you save the identifier instead of the block_id, we encounter a problem of selection of blocks in the widgets.\n\nWe have several blocks per country, which have the same identifier, so when we select a block it is the last created that is selected.\n\nExample:\n\nBlock FR => identifier = test\nBlock EN => identifier = test\n\nWhen I select the \"Block FR\", it is the Block EN that is selected.\n\n![Image](https://github.com/user-attachments/assets/7b93cbed-84e3-47bf-9245-de19c9b1f84f)","expectedResult":"The \"Block FR\" should be displayed","actualResult":"The \"Block EN\" should be displayed","source":"issue"},"signatures":[],"labels":{"area":["Content / CMS"],"component":["Widget"],"priority":"P2","severity":null,"reportedOn":["2.4.7-p3"]},"categories":["Content"],"triage":{"model":"@cf/cloudflare/clef","requestHash":"a6e1ad0f155e1d2b08dd6c2bf901ccd77348f0378a04b63eb16d2ea4409df362","isBugfix":0.9778,"changeKind":{"choice":"bugfix","probabilities":{"bugfix":0.9445,"feature":0.0091,"refactor":0.0198,"tests_only":0.0152,"docs_only":0.0055,"dependency":0.0059},"confidence":0.8714},"scope":{"score":0.6355,"probabilities":{"0":0.4698,"1":0.425,"2":0.1052},"confidence":0.1186},"risk":{"score":0.3711,"probabilities":{"0":0.6665,"1":0.2959,"2":0.0376},"confidence":0.2998},"area":{"choice":"admin","probabilities":{"catalog":0.0168,"checkout":0.0139,"customer":0.0121,"admin":0.7222,"graphql_api":0.0129,"framework":0.027,"frontend":0.1233,"other":0.0718},"confidence":0.4782},"securityRelevant":0.0068,"reportedVersion":{"choice":"2.4.7-p3","probabilities":{"2.4.0":0.0024,"2.4.0-p1":0.0024,"2.4.1":0.0023,"2.4.1-p1":0.0024,"2.4.2":0.0024,"2.4.2-p1":0.0025,"2.4.2-p2":0.0027,"2.4.3":0.0026,"2.4.3-p1":0.0029,"2.4.3-p2":0.0032,"2.4.3-p3":0.0032,"2.4.4":0.0028,"2.4.4-p1":0.0028,"2.4.4-p10":0.0034,"2.4.4-p11":0.004,"2.4.4-p12":0.0035,"2.4.4-p13":0.0041,"2.4.4-p14":0.0034,"2.4.4-p15":0.0033,"2.4.4-p16":0.0031,"2.4.4-p17":0.0034,"2.4.4-p18":0.0027,"2.4.4-p2":0.0024,"2.4.4-p3":0.0023,"2.4.4-p4":0.0025,"2.4.4-p5":0.0028,"2.4.4-p6":0.0034,"2.4.4-p7":0.0031,"2.4.4-p8":0.0032,"2.4.4-p9":0.0027,"2.4.5":0.0027,"2.4.5-p1":0.0026,"2.4.5-p10":0.0027,"2.4.5-p11":0.0029,"2.4.5-p12":0.0034,"2.4.5-p13":0.003,"2.4.5-p14":0.0033,"2.4.5-p15":0.0028,"2.4.5-p16":0.0031,"2.4.5-p17":0.0029,"2.4.5-p2":0.0026,"2.4.5-p3":0.0027,"2.4.5-p4":0.0027,"2.4.5-p5":0.0029,"2.4.5-p6":0.0032,"2.4.5-p7":0.0031,"2.4.5-p8":0.003,"2.4.5-p9":0.0026,"2.4.6":0.0047,"2.4.6-p1":0.004,"2.4.6-p10":0.0047,"2.4.6-p11":0.0049,"2.4.6-p12":0.0047,"2.4.6-p13":0.0045,"2.4.6-p14":0.0043,"2.4.6-p15":0.0039,"2.4.6-p2":0.0029,"2.4.6-p3":0.0036,"2.4.6-p4":0.0049,"2.4.6-p5":0.0038,"2.4.6-p6":0.0044,"2.4.6-p7":0.0042,"2.4.6-p8":0.0034,"2.4.6-p9":0.0028,"2.4.7":0.0637,"2.4.7-p1":0.0045,"2.4.7-p10":0.0032,"2.4.7-p2":0.0095,"2.4.7-p3":0.6109,"2.4.7-p4":0.0242,"2.4.7-p5":0.011,"2.4.7-p6":0.0111,"2.4.7-p7":0.0074,"2.4.7-p8":0.0059,"2.4.7-p9":0.0048,"2.4.8":0.0057,"2.4.8-p1":0.0049,"2.4.8-p2":0.0054,"2.4.8-p3":0.0055,"2.4.8-p4":0.0052,"2.4.8-p5":0.0042,"2.4.9":0.0041,"unspecified":0.003},"confidence":0.3716},"backportWorthy":{"score":1.6905,"probabilities":{"0":0.058,"1":0.1935,"2":0.7485},"confidence":0.4016}},"curated":{"title":"Wrong block selected in widgets when blocks have the same identifier","description":"When blocks have the same identifier and the Block FR is selected in the widget, the Block EN, the last created, is selected instead. In getRowClickCallback of the Cms widget Chooser, blockId is now read from the first td of the row, so widget_parameters use the block id instead of the identifier.","categories":["Content"],"author":"claude-code/opus-5.5","date":"2026-10-06","reviewedBy":null},"tests":{"2.4.8-p5":{"before":"fail","after":"pass","adapted":false,"runAt":"2026-10-06T09:20:15.928Z","releaseCommit":"870a22c63d9d9b68fa3297962e2d5d5841115814","suites":{"unit":{"before":"fail","after":"pass","runAt":"2026-10-06T09:20:15.928Z"}}},"2.4.7-p10":{"before":"fail","after":"pass","adapted":false,"runAt":"2026-10-06T09:29:29.353Z","releaseCommit":"72561bf80652f57cc642a03e2c9a51d74a285b14","suites":{"unit":{"before":"fail","after":"pass","runAt":"2026-10-06T09:29:29.353Z"}}}}},"_documentation":"https://magento.watch/api","_description":"Upstream fix magento2-39722 details"}