{"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":"232b2d46126af3fd0bfa2a9247120fe1d254609b62f89eb307100dadeb77bdc0","isBugfix":0.9797,"changeKind":{"choice":"bugfix","probabilities":{"bugfix":0.9578,"feature":0.0063,"refactor":0.0202,"tests_only":0.008,"docs_only":0.0038,"dependency":0.0039},"confidence":0.9015},"scope":{"score":1.0995,"probabilities":{"0":0.267,"1":0.3664,"2":0.3666},"confidence":0.0099},"risk":{"score":0.5406,"probabilities":{"0":0.5259,"1":0.4075,"2":0.0666},"confidence":0.1706},"area":{"choice":"catalog","probabilities":{"catalog":0.6633,"checkout":0.0152,"customer":0.0111,"admin":0.0936,"graphql_api":0.0111,"framework":0.0284,"frontend":0.1053,"other":0.072},"confidence":0.3901},"securityRelevant":0.0063,"reportedVersion":{"choice":"2.4.7-p4","probabilities":{"2.4.0":0.0019,"2.4.0-p1":0.0023,"2.4.1":0.002,"2.4.1-p1":0.0023,"2.4.2":0.0019,"2.4.2-p1":0.0024,"2.4.2-p2":0.0024,"2.4.3":0.0021,"2.4.3-p1":0.0027,"2.4.3-p2":0.0029,"2.4.3-p3":0.0029,"2.4.4":0.0024,"2.4.4-p1":0.0027,"2.4.4-p10":0.0032,"2.4.4-p11":0.0036,"2.4.4-p12":0.0035,"2.4.4-p13":0.0037,"2.4.4-p14":0.0035,"2.4.4-p15":0.0033,"2.4.4-p16":0.0032,"2.4.4-p17":0.0035,"2.4.4-p18":0.0026,"2.4.4-p2":0.0022,"2.4.4-p3":0.0023,"2.4.4-p4":0.003,"2.4.4-p5":0.0023,"2.4.4-p6":0.0024,"2.4.4-p7":0.0026,"2.4.4-p8":0.0025,"2.4.4-p9":0.0025,"2.4.5":0.0022,"2.4.5-p1":0.0026,"2.4.5-p10":0.0027,"2.4.5-p11":0.0029,"2.4.5-p12":0.0037,"2.4.5-p13":0.0032,"2.4.5-p14":0.0032,"2.4.5-p15":0.0028,"2.4.5-p16":0.0038,"2.4.5-p17":0.0028,"2.4.5-p2":0.0025,"2.4.5-p3":0.0027,"2.4.5-p4":0.0034,"2.4.5-p5":0.0029,"2.4.5-p6":0.003,"2.4.5-p7":0.0028,"2.4.5-p8":0.0027,"2.4.5-p9":0.0025,"2.4.6":0.0053,"2.4.6-p1":0.005,"2.4.6-p10":0.0051,"2.4.6-p11":0.0055,"2.4.6-p12":0.0052,"2.4.6-p13":0.0049,"2.4.6-p14":0.005,"2.4.6-p15":0.0039,"2.4.6-p2":0.0033,"2.4.6-p3":0.0036,"2.4.6-p4":0.0054,"2.4.6-p5":0.0043,"2.4.6-p6":0.0052,"2.4.6-p7":0.0047,"2.4.6-p8":0.0033,"2.4.6-p9":0.0029,"2.4.7":0.0747,"2.4.7-p1":0.0042,"2.4.7-p10":0.0034,"2.4.7-p2":0.0032,"2.4.7-p3":0.0123,"2.4.7-p4":0.6111,"2.4.7-p5":0.0148,"2.4.7-p6":0.0104,"2.4.7-p7":0.0079,"2.4.7-p8":0.0063,"2.4.7-p9":0.0052,"2.4.8":0.0051,"2.4.8-p1":0.0055,"2.4.8-p2":0.006,"2.4.8-p3":0.0065,"2.4.8-p4":0.0059,"2.4.8-p5":0.0049,"2.4.9":0.0044,"unspecified":0.0024},"confidence":0.3731},"backportWorthy":{"score":1.438,"probabilities":{"0":0.1592,"1":0.2437,"2":0.5971},"confidence":0.1619}},"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"}