Skip to content

Commit

Permalink
fix wrong array index mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
solverat committed Apr 18, 2018
1 parent 3a2e969 commit 4480440
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/I18nBundle/Adapter/PathGenerator/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private function documentUrlsFromLanguage(PimcoreDocument $currentDocument, $onl
'locale' => $pageInfo['locale'],
'hrefLang' => $pageInfo['hrefLang'],
'localeUrlMapping' => $pageInfo['localeUrlMapping'],
'key' => $pageInfo['key'],
'key' => $currentDocument->getKey(),
'url' => $pageInfo['url']
];
}
Expand Down Expand Up @@ -140,8 +140,7 @@ private function documentUrlsFromCountry(PimcoreDocument $currentDocument, $only
'locale' => $pageInfo['locale'],
'hrefLang' => $pageInfo['hrefLang'],
'localeUrlMapping' => $pageInfo['localeUrlMapping'],
'key' => $pageInfo['key'],
'relativePath' => $pageInfo['key'],
'key' => $currentDocument->getKey(),
'url' => $pageInfo['url']
];
}
Expand Down Expand Up @@ -200,13 +199,15 @@ private function documentUrlsFromCountry(PimcoreDocument $currentDocument, $only
$routes[] = [
'languageIso' => $pageInfo['languageIso'],
'countryIso' => $pageInfo['countryIso'],
'locale' => $pageInfo['locale'],
'hrefLang' => $pageInfo['hrefLang'],
'localeUrlMapping' => $pageInfo['localeUrlMapping'],
'key' => $document->getKey(),
'relativePath' => $relativePath,
'hasPrettyUrl' => $hasPrettyUrl,
'url' => $url
];

//document does not exist.
} else {
$hardLinksToCheck[] = $pageInfo;
Expand Down
2 changes: 0 additions & 2 deletions src/I18nBundle/Adapter/PathGenerator/StaticRoute.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ public function getUrls(PimcoreDocument $currentDocument = null, $onlyShowRootLa
'countryIso' => $pageInfo['countryIso'],
'hrefLang' => $pageInfo['hrefLang'],
'localeUrlMapping' => $pageInfo['localeUrlMapping'],
'key' => $pageInfo['key'],
'url' => $pageInfo['url'],
'domainUrl' => $pageInfo['domainUrl']
];
Expand Down Expand Up @@ -149,7 +148,6 @@ public function getUrls(PimcoreDocument $currentDocument = null, $onlyShowRootLa
'locale' => $routeInfo['locale'],
'hrefLang' => $routeInfo['hrefLang'],
'localeUrlMapping' => $routeInfo['localeUrlMapping'],
'key' => $routeInfo['key'],
# use domainUrl element since $link already comes with the locale part!
'url' => System::joinPath([$routeInfo['domainUrl'], $link])
];
Expand Down

0 comments on commit 4480440

Please sign in to comment.