Skip to content

Commit

Permalink
Issue 891: Add missing change (#906)
Browse files Browse the repository at this point in the history
  • Loading branch information
blackcoder87 authored Jan 23, 2024
1 parent c22563e commit 5bfd555
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions application/libraries/Ilch/Layout/Helper/Menu/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,13 @@ public function getItems(string $tpl = '', array $options = []): string
continue;
}
$box = $this->boxMapper->getSelfBoxByIdLocale($item->getBoxId(), $locale);

if (!$box) {
// Get box without locale if no box with the requested locale was found. Display an "unlocalized"
// one instead of failing with an error or showing nothing.
$box = $this->boxMapper->getSelfBoxByIdLocale($item->getBoxId());
}

// purify content of user created box
$contentHtml = $this->layout->purify($box->getContent());
} else {
Expand Down

0 comments on commit 5bfd555

Please sign in to comment.