New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Product Flat Indexer IFNULL on nullable datetime attributes fallbacks to global #35499
Comments
Hi @vo1. Thank you for your report.
Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
For more details, review the Magento Contributor Assistant documentation. Add a comment to assign the issue: To learn more about issue processing workflow, refer to the Code Contributions.
🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket. ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
Hi @engcom-November. Thank you for working on this issue.
|
Hi @vo1 , |
Hi. |
Hi @vo1 , |
Hi @vo1 , |
Hi, could you reopen the issue? You can find the issue, if you take a look inside the implementation.
The sql query clearly has an Regarding your problem:
You need to enable the flat index, there is also a support doument for that: https://docs.magento.com/user-guide/catalog/catalog-flat.html Thanks! |
Hi @engcom-November, could you reopen the issue? Details you can find in my comment above. Thanks. |
Preconditions and environment
When you have store/website datetime attribute with global value set by some API call, you cannot have scoped values properly loaded into flat data when they are set to null.
e.g.
Product.attribute.global = 2022-05-19T00:00:00
Product.attribute.store1 = 2022-05-22T00:00:00
Product.attribute.store2 = NULL (cleared in backend with unchecked "Use default" saves as NULL value into database)
Will work totally fine on product load or when flat index is disabled, but when product flat enabled results in:
catalog_product_flat_1 = 2022-05-22T00:00:00
catalog_product_flat_2 = 2022-05-19T00:00:00
Steps to reproduce
Expected result
Properly fall back to scoped value when attribute is empty for store/website scope
Actual result
Product flat data for the entity on store will contain global value e.g. 2022-05-19 instead of NULL.
Additional information
ELECT
et
.row_id
,et
.entity_id
,Ifnull(st1.value, t1.value) AS
bestelbaar_vanaf
,Ifnull(st2.value, t2.value) AS
news_from_date
,Ifnull(st3.value, t3.value) AS
news_to_date
,Ifnull(st4.value, t4.value) AS
orderable_until
,Ifnull(st5.value, t5.value) AS
special_from_date
,Ifnull(st6.value, t6.value) AS
special_to_date
FROM
catalog_product_entity_tmp_indexer
ASet
INNER JOIN
catalog_product_entity
ASe
ON e.entity_id = et.entity_id
AND ( e.created_in <= '1556550000'
AND e.updated_in > '1556550000' )
LEFT JOIN
catalog_product_entity_datetime
ASt1
Release note
\Magento\Catalog\Model\Indexer\Product\Flat\TableBuilder::_fillTemporaryTable generates the IFNULL fallbacks.
Triage and priority
The text was updated successfully, but these errors were encountered: