Skip to content

Commit 936e744

Browse files
committed
Improved error message about missing category id and now outputting error in a red color in the backoffice so it pops more.
1 parent 8a1ddb4 commit 936e744

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Checker/Catalog/Category/UrlPath.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,9 @@ private function fetchAllCategoriesWithUrlPathCalculatedByUrlKey()
163163
if (array_key_exists($id, $tempCatData)) {
164164
$calculatedUrlPath[] = $tempCatData[$id]['url_key'];
165165
} else {
166-
throw new LocalizedException(__("Can't find category with id: '$id'"));
166+
throw new LocalizedException(__(
167+
"Can't find category with id: '$id' (this id comes from a category's path attribute)"
168+
));
167169
}
168170
}
169171

view/adminhtml/templates/metadata.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<dd><?= $block->escapeHtml($metadata['initiator'] ?? '') ?></dd>
4242
<?php if (isset($metadata['error']) && $metadata['error'] !== ''): ?>
4343
<dt><?= $block->escapeHtml(__('Error')) ?>:</dt>
44-
<dd><?= $block->escapeHtml($metadata['error'] ?? '') ?></dd>
44+
<dd style="color: red;"><?= $block->escapeHtml($metadata['error'] ?? '') ?></dd>
4545
<?php endif; ?>
4646
</dl>
4747
<?php endif; ?>

0 commit comments

Comments
 (0)