Skip to content

Commit 73e3c9b

Browse files
committed
MC-21811: Canonical_url displays the backend domain instead of relative
- add return null
1 parent 256ff9b commit 73e3c9b

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

app/code/Magento/CatalogGraphQl/Model/Resolver/Category/CanonicalUrl.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,6 @@ public function resolve(
5454
$baseUrl = $category->getUrlInstance()->getBaseUrl();
5555
return str_replace($baseUrl, '', $category->getUrl());
5656
}
57+
return null;
5758
}
5859
}

app/code/Magento/CatalogGraphQl/Model/Resolver/Product/CanonicalUrl.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,6 @@ public function resolve(
5353
$product->getUrlModel()->getUrl($product, ['_ignore_category' => true]);
5454
return $product->getRequestPath();
5555
}
56+
return null;
5657
}
5758
}

0 commit comments

Comments
 (0)