Skip to content

Commit c3fa46d

Browse files
committed
MC-38168: Manual Indexer after Merchandising - Empty Catalog/ Number of products incorrect
1 parent 8ea52e3 commit c3fa46d

File tree

1 file changed

+4
-3
lines changed
  • app/code/Magento/Catalog/Model/Indexer/Product/Category/Action

1 file changed

+4
-3
lines changed

app/code/Magento/Catalog/Model/Indexer/Product/Category/Action/Rows.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ public function __construct(
9797
* @return $this
9898
* @throws \Exception if metadataPool doesn't contain metadata for ProductInterface
9999
* @throws \DomainException
100+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
100101
*/
101102
public function execute(array $entityIds = [], $useTempTable = false)
102103
{
@@ -105,7 +106,7 @@ public function execute(array $entityIds = [], $useTempTable = false)
105106
$this->limitationByProducts = $idsToBeReIndexed;
106107
$this->useTempTable = $useTempTable;
107108
$indexer = $this->indexerRegistry->get(CategoryProductIndexer::INDEXER_ID);
108-
$workingState = $this->getWorkingState();
109+
$workingState = $this->isWorkingState();
109110

110111
if (!$indexer->isScheduled()
111112
|| ($indexer->isScheduled() && !$useTempTable)
@@ -123,7 +124,7 @@ public function execute(array $entityIds = [], $useTempTable = false)
123124
$this->reindex();
124125

125126
// get actual state
126-
$workingState = $this->getWorkingState();
127+
$workingState = $this->isWorkingState();
127128

128129
if ($useTempTable && !$workingState && $indexer->isScheduled()) {
129130
foreach ($this->storeManager->getStores() as $store) {
@@ -159,7 +160,7 @@ public function execute(array $entityIds = [], $useTempTable = false)
159160
*
160161
* @return bool
161162
*/
162-
private function getWorkingState() : bool
163+
private function isWorkingState() : bool
163164
{
164165
$indexer = $this->indexerRegistry->get(CategoryProductIndexer::INDEXER_ID);
165166
$sharedIndexer = $this->indexerRegistry->get(ProductCategoryIndexer::INDEXER_ID);

0 commit comments

Comments
 (0)