{"data":{"id":"magento2-40421","source":"github-pr","sourceRef":"magento/magento2#40421","title":"Magento Catalog Product list widget returns incorrect count","pr":{"number":40421,"url":"https://github.com/magento/magento2/pull/40421","author":"MaximLogic","mergedAt":"2026-03-05T14:41:21Z","mergeCommit":"2cf3742e2b5c55c391ba4f29b83c2966800d013b","headCommit":"4803d3fda596c209cc4bd176488a822191256c4e","baseRef":"2.4-develop","diffSha256":"fab6a7a0562803e3ae810d0b485ceb5ef52a398cea8fe9d44628dec4f4244f34"},"issues":[{"number":39863,"url":"https://github.com/magento/magento2/issues/39863","title":"Magento Catalog Product list widget returns incorrect count","labels":["Area: Catalog","Component: Widget","Issue: Confirmed","Priority: P3","Progress: PR Created","Progress: done","Reported on 2.4.7-p4","Reproduced on 2.4.x"],"kind":"human"}],"fixedIn":"2.4.9","containingTags":["2.4.9"],"reportedOn":"2.4.7-p4","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":"conflict","2.4.7-p1":"conflict","2.4.7-p2":"conflict","2.4.7-p3":"conflict","2.4.7-p4":"conflict","2.4.7-p5":"conflict","2.4.7-p6":"conflict","2.4.7-p7":"conflict","2.4.7-p8":"conflict","2.4.7-p9":"conflict","2.4.7-p10":"conflict","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":[],"components":["magento/module-catalog-widget"],"files":[{"path":"app/code/Magento/CatalogWidget/Block/Product/ProductsList.php","change":"modified","package":"magento/module-catalog-widget"}],"stripped":{"tests":["app/code/Magento/CatalogWidget/Test/Unit/Block/Product/ProductsListTest.php"],"docs":[],"outsideCode":[]},"linesChanged":23,"mergeBatched":false,"excluded":null,"sections":{"description":"instead it display total 10 product 5 on PAGE 1 and 5 ON PAGE 2","stepsToReproduce":"1. insert a catalog product widget from page builder  (Insert Row, drag Html Code and insert widget)\n2. set no  product per page = 5\n3. set no of product to display = 9","expectedResult":"a widget should show total 9 product with 5 products on PAGE 1 and 4 products on page 2","actualResult":"instead it display total 10 product 5 on PAGE 1 and 5 ON PAGE 2","source":"issue"},"signatures":[],"labels":{"area":["Catalog"],"component":["Widget"],"priority":"P3","severity":null,"reportedOn":["2.4.7-p4"]},"categories":["Catalog/Product","Content"],"triage":{"model":"@cf/cloudflare/clef","requestHash":"20816bc6a8fc1c424364766fa6c5da7ba695776d6e7f6860c046fda2f02663c0","isBugfix":0.9788,"changeKind":{"choice":"bugfix","probabilities":{"bugfix":0.9524,"feature":0.0059,"refactor":0.017,"tests_only":0.0082,"docs_only":0.0036,"dependency":0.0035,"cleanup":0.0094},"confidence":0.8921},"scope":{"score":1.0941,"probabilities":{"0":0.2818,"1":0.3423,"2":0.3759},"confidence":0.0068},"risk":{"score":0.5598,"probabilities":{"0":0.5099,"1":0.4205,"2":0.0696},"confidence":0.1625},"area":{"choice":"catalog","probabilities":{"catalog":0.6426,"checkout":0.0162,"customer":0.012,"admin":0.0961,"graphql_api":0.0115,"framework":0.0316,"frontend":0.1108,"other":0.0792},"confidence":0.3625},"securityRelevant":0.0062,"reportedVersion":{"choice":"2.4.7-p4","probabilities":{"2.4.0":0.0018,"2.4.0-p1":0.0022,"2.4.1":0.0019,"2.4.1-p1":0.0022,"2.4.2":0.0019,"2.4.2-p1":0.0022,"2.4.2-p2":0.0022,"2.4.3":0.0019,"2.4.3-p1":0.0025,"2.4.3-p2":0.0027,"2.4.3-p3":0.0028,"2.4.4":0.0022,"2.4.4-p1":0.0027,"2.4.4-p10":0.0033,"2.4.4-p11":0.0035,"2.4.4-p12":0.0033,"2.4.4-p13":0.0035,"2.4.4-p14":0.0032,"2.4.4-p15":0.0029,"2.4.4-p16":0.0028,"2.4.4-p17":0.0032,"2.4.4-p18":0.0025,"2.4.4-p2":0.0021,"2.4.4-p3":0.0022,"2.4.4-p4":0.0029,"2.4.4-p5":0.0022,"2.4.4-p6":0.0023,"2.4.4-p7":0.0027,"2.4.4-p8":0.0025,"2.4.4-p9":0.0024,"2.4.5":0.0021,"2.4.5-p1":0.0024,"2.4.5-p10":0.0025,"2.4.5-p11":0.0028,"2.4.5-p12":0.0037,"2.4.5-p13":0.0033,"2.4.5-p14":0.0032,"2.4.5-p15":0.0027,"2.4.5-p16":0.0035,"2.4.5-p17":0.0028,"2.4.5-p2":0.0024,"2.4.5-p3":0.0026,"2.4.5-p4":0.0036,"2.4.5-p5":0.0027,"2.4.5-p6":0.0029,"2.4.5-p7":0.0031,"2.4.5-p8":0.0028,"2.4.5-p9":0.0024,"2.4.6":0.0042,"2.4.6-p1":0.0043,"2.4.6-p10":0.0046,"2.4.6-p11":0.0053,"2.4.6-p12":0.0051,"2.4.6-p13":0.0049,"2.4.6-p14":0.0047,"2.4.6-p15":0.0045,"2.4.6-p2":0.0031,"2.4.6-p3":0.004,"2.4.6-p4":0.006,"2.4.6-p5":0.0043,"2.4.6-p6":0.0049,"2.4.6-p7":0.0048,"2.4.6-p8":0.0033,"2.4.6-p9":0.0027,"2.4.7":0.0872,"2.4.7-p1":0.0036,"2.4.7-p10":0.0031,"2.4.7-p2":0.0028,"2.4.7-p3":0.0122,"2.4.7-p4":0.6053,"2.4.7-p5":0.0146,"2.4.7-p6":0.011,"2.4.7-p7":0.0076,"2.4.7-p8":0.0061,"2.4.7-p9":0.0054,"2.4.8":0.006,"2.4.8-p1":0.0057,"2.4.8-p2":0.0064,"2.4.8-p3":0.0065,"2.4.8-p4":0.0059,"2.4.8-p5":0.0052,"2.4.9":0.0044,"unspecified":0.0021},"confidence":0.3679},"backportWorthy":{"score":1.4412,"probabilities":{"0":0.1593,"1":0.2402,"2":0.6005},"confidence":0.1655}},"curated":{"title":"Fixes the products list widget showing more products than the configured count","description":"With pagination enabled and a total products count that is not a multiple of products per page, the catalog product widget displayed more products than configured, for example 10 instead of 9, and the pager showed Items 6 to 10 of 9 total. The fix applies the total limit when calculating the SQL limit and offset.","categories":["Catalog/Product","Content"],"author":"claude-code/opus-5.5","date":"2026-10-06","reviewedBy":null},"tests":null},"_documentation":"https://magento.watch/api","_description":"Upstream fix magento2-40421 details"}