Skip to content

Commit 18f8e84

Browse files
ENGCOM-1464: [BUGFIX] Added row_id to the flat action indexer so the value isn't s… #15010
- Merge Pull Request #15010 from experius/magento2:experius-2.2-patch-commerce-0-rowid-flatproductindex - Merged commits: 1. 2af7b14 2. 74371e7 3. 07e2ca3
2 parents ffac6ee + 07e2ca3 commit 18f8e84

File tree

2 files changed

+3
-1
lines changed
  • app/code/Magento/Catalog/Model/Indexer/Product/Flat/Action
  • dev/tests/integration/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action

2 files changed

+3
-1
lines changed

app/code/Magento/Catalog/Model/Indexer/Product/Flat/Action/Indexer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ public function write($storeId, $productId, $valueFieldSuffix = '')
175175

176176
if (!empty($updateData)) {
177177
$updateData += ['entity_id' => $productId];
178+
$updateData += ['row_id' => $productId];
178179
$updateFields = [];
179180
foreach ($updateData as $key => $value) {
180181
$updateFields[$key] = $key;

dev/tests/integration/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/RowTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,13 @@ public function testProductUpdate()
6161
$this->_processor->getIndexer()->isScheduled(),
6262
'Indexer is in scheduled mode when turned to update on save mode'
6363
);
64-
$this->_processor->reindexAll();
6564

6665
$this->_product->load(1);
6766
$this->_product->setName('Updated Product');
6867
$this->_product->save();
6968

69+
$this->_processor->reindexAll();
70+
7071
$category = $categoryFactory->create()->load(9);
7172
$layer = $listProduct->getLayer();
7273
$layer->setCurrentCategory($category);

0 commit comments

Comments
 (0)