Twig template for Object Description doesn't check for null values.
Closed this issue · 2 comments
aksm commented
What?
This may not be the only instance but as one example:
{% if data.related_item_host_display_label|length < 0 and data.related_item_host_title_info_title|length > 0 %}
<h6>Related Item Host Title Info: </h6><p>{{ data.related_item_host_title_info_title }}</p>
{% endif %}
The above doesn't check for null values and results in an empty body so it could for example be fixed by:
{% if (data.related_item_host_display_label|length < 0 or data.related_item_host_display_label is null) and data.related_item_host_title_info_title|length > 0 %}
<h6>Related Item Host Title Info: </h6><p>{{ data.related_item_host_title_info_title }}</p>
{% endif %}
Example object that illustrates the problem is Mechanics' Institute Quarterly, Vol. 2 No. 2
This will require more checking through the rest of the Additional Information logic.
alliomeria commented