Description
Preconditions and environment
- Magento version: 2.4.6
- Multi store setup
- Enable Flat Catalog Product
- Indexer mode: Update by schedule
- Product attribute (backend_type: varchar, used_in_product_listing: true)
Steps to reproduce
- Save varchar attribute value on global scope
- Switch to store scope, uncheck
Use Default Value
checkbox and set empty/blank value in that varchar attribute - Check
catalog_product_flat_{store_id}
table after re-index data
You can see global scope value in the flat table instated of store scope value but in the EAV table (catalog_product_entity_varchar
) you can see store scope value. When indexer mode is set to Update on save then catalog_product_flat_{store_id}
table have store scope value.
Expected result
catalog_product_flat_{store_id}
should have store scope value when Indexer mode is set Update by schedule.
Actual result
catalog_product_flat_{store_id}
have global scope value when product have attribute value on store scope.
Additional information
Product flat re-indexer code have SQL query with getIfNullSql function which might replacing store scope null value with global scope value.
https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Catalog/Model/Indexer/Product/Flat/TableBuilder.php#L333-L337
Release note
No response
Triage and priority
- 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”.