-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
Preconditions (*)
- Magento 2.4-develop
- 2.3.5-p1 is all I have tested this in so far.
Steps to reproduce (*)
-
Create a category in Magento with several products in it, all have the position in the category set to the value 1
-
Go to category page
Expected result (*)
- The newest products in the database (the one with the highest entity_id) are shown first
- The Order by for the SQL query for retrieving the products
SELECT `e`.*, `cat_index`.`position` AS `cat_index_position`, `price_index`.`price`, `price_index`.`tax_class_id`, `price_index`.`final_price`, IF(price_index.tier_price IS NOT NULL, LEAST(price_index.min_price, price_index.tier_price), price_index.min_price) AS `minimal_price`, `price_index`.`min_price`, `price_index`.`max_price`, `price_index`.`tier_price` FROM `catalog_product_entity` AS `e`
INNER JOIN `catalog_category_product_index_store1` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id=1 AND cat_index.visibility IN(2, 4) AND cat_index.category_id=33
INNER JOIN `catalog_product_index_price` AS `price_index` ON price_index.entity_id = e.entity_id AND price_index.customer_group_id = 0 AND price_index.website_id = '1' ORDER BY `cat_index`.`position` asc, `e`.`entity_id` DESC
Actual result (*)
- The oldest products(with the lower entity_id) are shown first
- The Order by for the SQL query for retrieving the products
SELECT `e`.*, `price_index`.`price`, `price_index`.`tax_class_id`, `price_index`.`final_price`, IF(price_index.tier_price IS NOT NULL, LEAST(price_index.min_price, price_index.tier_price), price_index.min_price) AS `minimal_price`, `price_index`.`min_price`, `price_index`.`max_price`, `price_index`.`tier_price`, IFNULL(review_summary.reviews_count, 0) AS `reviews_count`, IFNULL(review_summary.rating_summary, 0) AS `rating_summary`, `stock_status_index`.`stock_status` AS `is_salable` FROM `catalog_product_entity` AS `e`
INNER JOIN `catalog_product_index_price` AS `price_index` ON price_index.entity_id = e.entity_id AND price_index.customer_group_id = 0 AND price_index.website_id = '1'
LEFT JOIN `review_entity_summary` AS `review_summary` ON e.entity_id = review_summary.entity_pk_value AND review_summary.store_id = 1 AND review_summary.entity_type = (SELECT `review_entity`.`entity_id` FROM `review_entity` WHERE (entity_code = 'product'))
INNER JOIN `cataloginventory_stock_status` AS `stock_status_index` ON e.entity_id = stock_status_index.product_id AND stock_status_index.website_id = 0 AND stock_status_index.stock_id = 1 WHERE (stock_status_index.stock_status = 1) AND (e.entity_id IN (1201, 1202, 1203)) ORDER BY FIELD(e.entity_id,1201,1202,1203)
Search Engine=MySQL
the newest product in the database (the one with the highest entity_id) was shown first. With Magento 2.4-develop with Search Engine= Elasticsearch 7
this behaviour changed. The oldest product is shown first, the newest last.
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
The severity of this issue will differ between niches but for some businesses, this is quite critical. Like designer or boutique fashion retailers where the target audience frequent the website to view the latest items to hit the fashion lines etc.
I can't believe there are not more reports of this... I did ask the question on Magento Stack Exchange and it is passed by will hardly any views and zero interaction.
I'm obviously assuming this is a bug and not meant to happen.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status