Skip to content

Commit 3ac2c28

Browse files
committed
MAGETWO-92306: [Forwardport] Fix Category Product Indexer
1 parent e96dc9f commit 3ac2c28

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

app/code/Magento/Catalog/Model/Indexer/Category/Product/TableMaintainer.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
use Magento\Catalog\Model\Indexer\Category\Product\AbstractAction;
1414
use Magento\Framework\Indexer\ScopeResolver\IndexScopeResolver as TableResolver;
1515

16+
/**
17+
* Class encapsulate logic of work with tables per store in Category Product indexer
18+
*/
1619
class TableMaintainer
1720
{
1821
/**
@@ -202,9 +205,14 @@ public function createMainTmpTable(int $storeId)
202205
* @param $storeId
203206
*
204207
* @return string
208+
*
209+
* @throws \Exception
205210
*/
206211
public function getMainTmpTable(int $storeId)
207212
{
213+
if (!isset($this->mainTmpTable[$storeId])) {
214+
throw new \Exception('Temporary table does not exist');
215+
}
208216
return $this->mainTmpTable[$storeId];
209217
}
210218
}

app/code/Magento/Catalog/etc/adminhtml/di.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,4 @@
220220
<argument name="filter" xsi:type="object">Magento\Catalog\Ui\DataProvider\Product\AddSearchKeyConditionToCollection</argument>
221221
</arguments>
222222
</type>
223-
<type name="Magento\Framework\App\ResourceConnection">
224-
<plugin name="get_catalog_category_product_index_table_name" type="Magento\Catalog\Model\Indexer\Category\Product\Plugin\TableResolver"/>
225-
</type>
226223
</config>

0 commit comments

Comments
 (0)