Skip to content

Commit

Permalink
[BUGFIX] Fix exception when showing metadata of a document (#1344)
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastian Meyer <[email protected]>
  • Loading branch information
thomaslow and sebastian-meyer committed Oct 10, 2024
1 parent 8427b41 commit ffc9866
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Controller/MetadataController.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ private function buildUrlFromMetadata(array $metadata): array

foreach ($metadata as $i => $section) {
if ($this->settings['linkTitle'] && $section['_id'] && isset($section['title']) && !empty($section['title'])) {
$details = $this->currentDocument->getLogicalStructure($section['_id']);
$details = $this->currentDocument->getLogicalStructure($section['_id'][0]);
$buildUrl[$i]['title'] = [
'id' => $this->document->getUid(),
'page' => (!empty($details['points']) ? (int) $details['points'] : 1),
Expand Down

0 comments on commit ffc9866

Please sign in to comment.