Skip to content

Commit 01aaf4f

Browse files
committed
Revert part of e8df3c6 and 505fd9f.
These will be replaced with a solution that solves more problems.
1 parent ad44399 commit 01aaf4f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

app/code/Magento/Catalog/Model/Indexer/Category/Flat/AbstractAction.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,15 +369,19 @@ protected function getAttributeValues($entityIds, $storeId)
369369
}
370370
$values = [];
371371

372+
foreach ($entityIds as $entityId) {
373+
$values[$entityId] = [];
374+
}
375+
372376
$attributes = $this->getAttributes();
373377
$attributesType = ['varchar', 'int', 'decimal', 'text', 'datetime'];
374378
foreach ($attributesType as $type) {
375379
foreach ($this->getAttributeTypeValues($type, $entityIds, $storeId) as $row) {
376-
if (isset($row['entity_id']) && isset($row['attribute_id'])) {
380+
if (isset($row[$this->getCategoryMetadata()->getLinkField()]) && isset($row['attribute_id'])) {
377381
$attributeId = $row['attribute_id'];
378382
if (isset($attributes[$attributeId])) {
379383
$attributeCode = $attributes[$attributeId]['attribute_code'];
380-
$values[$row['entity_id']][$attributeCode] = $row['value'];
384+
$values[$row[$this->getCategoryMetadata()->getLinkField()]][$attributeCode] = $row['value'];
381385
}
382386
}
383387
}

0 commit comments

Comments
 (0)