diff --git a/vendor/magento/module-import-export/Model/Import.php b/vendor/magento/module-import-export/Model/Import.php index aa3af449237f..013128c7df6b 100644 --- a/vendor/magento/module-import-export/Model/Import.php +++ b/vendor/magento/module-import-export/Model/Import.php @@ -665,11 +665,18 @@ public function validateSource(AbstractSource $source) $messages = $this->getOperationResultMessages($errorAggregator); $this->addLogComment($messages); - $result = !$errorAggregator->isErrorLimitExceeded(); - if ($result) { - $this->addLogComment(__('Import data validation is complete.')); + if ($errorAggregator->isErrorLimitExceeded()) { + return false; } - return $result; + + if ($this->getProcessedRowsCount() <= $errorAggregator->getInvalidRowsCount()) { + $this->addLogComment(__('There are no valid rows to import.')); + return false; + } + + $this->addLogComment(__('Import data validation is complete.')); + + return true; } /**