Skip to content

Commit

Permalink
Always make sure pages have detail (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
aschempp committed Aug 1, 2017
1 parent a15bb1c commit a43ee59
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function __construct(PageModel $rootPage, $label = null)
);
}

$this->rootPage = $rootPage;
$this->rootPage = $rootPage->loadDetails();
$this->linkLabel = $label;

if (null === $label) {
Expand Down Expand Up @@ -136,7 +136,7 @@ public function getTargetPage()
*/
public function setTargetPage(PageModel $targetPage, $isDirectFallback, $isCurrentPage = false)
{
$this->targetPage = $targetPage;
$this->targetPage = $targetPage->loadDetails();
$this->isDirectFallback = (bool) $isDirectFallback;
$this->isCurrentPage = (bool) $isCurrentPage;
}
Expand Down Expand Up @@ -221,7 +221,7 @@ public function getHref(UrlParameterBag $urlParameterBag)
$href = \Controller::generateFrontendUrl(
$targetPage->row(),
$urlParameterBag->generateParameters(),
$targetPage->language,
$targetPage->rootLanguage,
true
);

Expand Down

0 comments on commit a43ee59

Please sign in to comment.