Skip to content

event does not work as expected (catalog_block_product_list_collection) in Magento 2.4.3 #34292

Open
@zexperto

Description

@zexperto

Preconditions (*)

  1. Magento 2.4.3
  2. in general this issue appear in all Magento 2.4.x

Steps to reproduce (*)

  1. install Fresh Magento 2.4.3
  2. Create new Category (Ex: 'All Products')
  3. Create 20 simple products (with any data), I used import products and I used this naming ('simpel-01','simple-02','simple-03',etc.)
  4. open the Category page (All Products), {base_url}/all-products.html
  5. sort products by name, so we can see the list of products like ('simpel-01','simple-02','simple-03',etc..)
  6. use this event to filter the product list 'catalog_block_product_list_collection', I used this filter [$collection->addAttributeToFilter("sku",'simple-27');]
  7. go to the category page and refresh the page, you will have this message 'We can't find products matching the selection.'
  8. add this paratmer to the page {base_url}/all-products.html?p=2, you will see your filtered products

image
image

Expected result (*)

  1. I expect to do the filter before Magento set the pagination and the product should appear in the first page

Actual result (*)

  1. you have message that you do not have the filtered product but the product is exist in the next pages
    2.it looks like the filter happened only in the current page of products

Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • this issue affect the whole logic of product visibility and make the event is useless, and it prevent any kind of filtration for the product list

Metadata

Metadata

Assignees

Labels

Area: CatalogComponent: FrontendIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: dev in progressReported on 2.4.xIndicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchTriage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions