Skip to content

Commit

Permalink
Record view / fix javascript error when a metadata has multiple linea…
Browse files Browse the repository at this point in the history
…ge source descriptions

angular.js?v=2e31720b368df88f570059d390b081d82fe9cf75:15697 Error: [linky:notstring] Expected string but received: [...
  • Loading branch information
josegar74 committed Jan 13, 2025
1 parent 2e31720 commit 90a99e7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2001-2023 Food and Agriculture Organization of the
* Copyright (C) 2001-2025 Food and Agriculture Organization of the
* United Nations (FAO-UN), United Nations World Food Programme (WFP)
* and United Nations Environment Programme (UNEP)
*
Expand Down Expand Up @@ -587,7 +587,7 @@ private void checkIndexResponse(BulkResponse bulkItemResponses,
.add("MD_SecurityConstraintsUseLimitation")
.add("MD_SecurityConstraintsUseLimitationObject")
.add("overview")
.add("sourceDescription")
.add("sourceDescriptionObject")
.add("MD_ConstraintsUseLimitation")
.add("MD_ConstraintsUseLimitationObject")
.add("resourceType")
Expand Down
1 change: 0 additions & 1 deletion web-ui/src/main/resources/catalog/js/CatController.js
Original file line number Diff line number Diff line change
Expand Up @@ -1757,7 +1757,6 @@
$scope.publicationOptions = [];
$scope.getFacetLabel = gnFacetMetaLabel.getFacetLabel;


$http.get("../api/records/sharing/options").then(function (response) {
$scope.publicationOptions = response.data;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@ <h2 data-translate="">lineage</h2>
<p data-ng-bind-html="mdView.current.record.lineage | linky | newlines"></p>
</div>

<div data-ng-if="mdView.current.record.sourceDescription">
<div
data-ng-if="mdView.current.record.sourceDescription && mdView.current.record.sourceDescription.length > 0"
>
<h2 data-translate="">sourceDescription</h2>
<p data-ng-bind-html="mdView.current.record.sourceDescription | linky | newlines"></p>

<p
data-ng-repeat="d in mdView.current.record.sourceDescription track by $index"
data-ng-bind-html="d | linky | newlines"
></p>
</div>

<div data-ng-if="mdView.current.record.supplementalInformation">
Expand Down

0 comments on commit 90a99e7

Please sign in to comment.