Skip to content

Commit

Permalink
Merge pull request #22 from magento-commerce/PWA-3221
Browse files Browse the repository at this point in the history
PWA-3221::PWA Upward connector throws exception
  • Loading branch information
glo82145 authored Mar 21, 2024
2 parents 3ac2eb3 + 365613c commit 83e32ff
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Model/PageType.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,11 @@ private function findFinalUrl(string $requestPath, int $storeId, bool $findCusto
$urlRewrite = $this->findUrlFromRequestPath($requestPath, $storeId);
if ($urlRewrite) {
$this->redirectType = $urlRewrite->getRedirectType();
if($urlRewrite->getRedirectType() > 0) {
while ($urlRewrite && $urlRewrite->getRedirectType() > 0) {
$urlRewrite = $this->findUrlFromRequestPath($urlRewrite->getTargetPath(), $storeId);
}
} else {
$urlRewrite = $this->findUrlFromTargetPath($requestPath, $storeId);
while ($urlRewrite && $urlRewrite->getRedirectType() > 0) {
$urlRewrite = $this->findUrlFromRequestPath($urlRewrite->getTargetPath(), $storeId);
}
} else {
$urlRewrite = $this->findUrlFromTargetPath($requestPath, $storeId);
}
if ($urlRewrite && ($findCustom && !$urlRewrite->getEntityId() && !$urlRewrite->getIsAutogenerated())) {
$urlRewrite = $this->findUrlFromTargetPath($urlRewrite->getTargetPath(), $storeId);
Expand Down

0 comments on commit 83e32ff

Please sign in to comment.