-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
Summary (*)
When there is a loop going through a few products and linking those products to categories. Some categories get data copied from another store.
Examples (*)
It's hard to reproduce but imagine that we import/update some product data for different stores. And if we want to link / unlink products to / from "marketing categories" and those categories have different descriptions or other data.
The data may be received from previous store and saved in current store because \Magento\Catalog\Model\CategoryLinkRepository
loads categories without specifying store id. And in \Magento\Catalog\Model\CategoryRepository::get
all entities are stored as cached in a class property.
Proposed solution
Since there is no any data about a store_id in \Magento\Catalog\Model\CategoryProductLink
and column for store id in the table catalog_category_product
we can just load a category from the default store to avoid mismatch because of cache key all in CategoryRepository
Metadata
Metadata
Assignees
Labels
Type
Projects
Status