Skip to content

Commit 904587e

Browse files
committed
Since url_key's of categories with level 0 or 1 aren't being used on the frontend, we can ignore these (prevents some false positives on a few shops I tested this on).
1 parent c44de42 commit 904587e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Checker/Catalog/Category/UrlKey/EmptyUrlKey.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ private function checkForEmptyUrlKeyAttributeValues(): array
5959
->setStoreId($storeId)
6060
->addAttributeToSelect(UrlKeyChecker::URL_KEY_ATTRIBUTE)
6161
->addAttributeToSelect('name')
62+
->addAttributeToFilter('level', ['gt' => 1]) // cats with levels 0 or 1 aren't used in the frontend
6263
->addAttributeToFilter('entity_id', ['neq' => CategoryModel::TREE_ROOT_ID])
6364
->addAttributeToFilter([
6465
[

0 commit comments

Comments
 (0)