fix(inventory-catalog): don't join disabled products into collection #3401
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description (*)
MSI mistakenly conflates two situations as the same as a result of complex indexing behaviors.
cataloginventory_stock_index
orinventory_stock_*
cataloginventory_stock_index
orinventory_stock_*
Fixed Issues (if relevant)
Currently, when computing the children of composite products like Bundles, Groups and Configurables, MSI will accidentally join in disabled children resulting in records with
is_salable
=NULL
when adding stock data to a product collection.This commit restores the original behavior.
This problem comes from @bubasuma in two separate commits
The commit e8d2ca7 attempts to allow products on category pages when the stock has no sources.
The second 17cf342 attempts to allow computing the lowest price of a configurable using only in stock products.
I'm specifically reverting part of 17cf342 but e8d2ca7 is also mistaken.
Likely, both of these commits need to be reverted and reworked to disambiguate "not in the stock index" from:
Contribution checklist (*)