Skip to content

Commit 53643bf

Browse files
committed
ACP2E-1620: [QUANS] Scheduled import successfully runs despite errors in system.log file
- Fixed the CR comments
1 parent a7f02c5 commit 53643bf

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

app/code/Magento/ImportExport/Controller/Adminhtml/ImportResult.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@
2020
*/
2121
abstract class ImportResult extends Import
2222
{
23+
public const IMPORT_HISTORY_FILE_DOWNLOAD_ROUTE = '*/history/download';
24+
25+
/**
26+
* Limit view errors
27+
*/
28+
public const LIMIT_ERRORS_MESSAGE = 100;
29+
2330
/**
2431
* @var ReportProcessorInterface
2532
*/

app/code/Magento/ImportExport/Model/Import/RenderErrorMessages.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,13 @@
1616
use Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingError;
1717
use Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingErrorAggregatorInterface;
1818
use Magento\ImportExport\Model\Report\ReportProcessorInterface;
19+
use Magento\ImportExport\Controller\Adminhtml\ImportResult;
1920

2021
/**
2122
* Import Render Error Messages Service model.
2223
*/
2324
class RenderErrorMessages
2425
{
25-
public const IMPORT_HISTORY_FILE_DOWNLOAD_ROUTE = '*/history/download';
26-
27-
/**
28-
* Limit view errors
29-
*/
30-
public const LIMIT_ERRORS_MESSAGE = 100;
31-
3226
/**
3327
* @var ReportProcessorInterface
3428
*/
@@ -92,7 +86,7 @@ public function renderMessages(
9286
$escapedMessages = [];
9387
foreach ($this->getErrorMessages($errorAggregator) as $error) {
9488
$escapedMessages[] = (++$counter) . '. ' . $this->escaper->escapeHtml($error);
95-
if ($counter >= self::LIMIT_ERRORS_MESSAGE) {
89+
if ($counter >= ImportResult::LIMIT_ERRORS_MESSAGE) {
9690
break;
9791
}
9892
}
@@ -168,6 +162,6 @@ public function createErrorReport(ProcessingErrorAggregatorInterface $errorAggre
168162
*/
169163
public function createDownloadUrlImportHistoryFile($fileName): string
170164
{
171-
return $this->backendUrl->getUrl(self::IMPORT_HISTORY_FILE_DOWNLOAD_ROUTE, ['filename' => $fileName]);
165+
return $this->backendUrl->getUrl(ImportResult::IMPORT_HISTORY_FILE_DOWNLOAD_ROUTE, ['filename' => $fileName]);
172166
}
173167
}

0 commit comments

Comments
 (0)