Repository navigation
Problem: Markdown not rendered in Related descriptions / Related materials link lists (ISAD/RAD) #2383
Description
Current Behavior
Steps to reproduce the behavior
- Ensure Markdown is enabled.
- Create an archival description (ISAD or RAD template) with a title containing Markdown, e.g.
The Author, *The Book of Books ... A comprehensive list of all books ever written* (London: The Author, 2026). - Create a second description (containing anything), then link the first (main) description to it in Related descriptions (ISAD) or Related materials (RAD).
- View the second description in the interface.
Observed result
- In the Related descriptions (ISAD) or Related materials (RAD) list, the first description's title is shown with literal asterisks - Markdown is not transformed.
Affected template
apps/qubit/modules/informationobject/templates/_relatedMaterialDescriptions.php
The partial builds link text using$item->object->__toString()/$item->subject->__toString()and passes it directly tolink_to(), bypassingrender_title()/render_value_inline().
Both ISAD and RAD include this partial: plugins/sfIsadPlugin/modules/sfIsadPlugin/templates/indexSuccess.phpplugins/sfRadPlugin/modules/sfRadPlugin/templates/indexSuccess.php
Expected Behavior
Linked titles in the Related descriptions (ISAD) and Related materials (RAD) lists should be rendered consistently with titles elsewhere in AtoM when Markdown is enabled - i.e. *text* should appear as italics, not as literal asterisks.
This should match the behaviour already used in other templates, e.g. ISAD file list:
link_to(render_title($item), [$item, 'module' => 'informationobject'])
Possible Solution
Update apps/qubit/modules/informationobject/templates/_relatedMaterialDescriptions.php so the title portion of each link uses render_title() (which calls render_value_inline() and QubitMarkdown::parse()), instead of __toString().
Reference code, level of description, and publication status suffix remain plain text - only the linked description title needs Markdown rendering.
Updated partial:
<div class="field <?php echo render_b5_show_field_css_classes(); ?>">
<?php if ('rad' == $template) { ?>
<?php echo render_b5_show_label(__('Related materials')); ?>
<?php } else { ?>
<?php echo render_b5_show_label(__('Related descriptions')); ?>
<?php } ?>
<div class="<?php echo render_b5_show_value_css_classes(); ?>">
<ul class="<?php echo render_b5_show_list_css_classes(); ?>">
<?php foreach ($resource->relationsRelatedBysubjectId as $item) { ?>
<?php if (isset($item->type) && QubitTerm::RELATED_MATERIAL_DESCRIPTIONS_ID == $item->getTypeId()) { ?>
<?php if ($sf_user->isAuthenticated() || QubitTerm::PUBLICATION_STATUS_PUBLISHED_ID == $item->object->getPublicationStatus()->statusId) { ?>
<?php
$related = $item->object;
$linkContent = '';
if (isset($related->levelOfDescription) || isset($related->identifier)) {
if (isset($related->levelOfDescription)) {
$linkContent .= $related->levelOfDescription;
}
if (isset($related->identifier)) {
$linkContent .= (isset($related->levelOfDescription) ? ' ' : '').$related->referenceCode;
}
$linkContent .= ' - ';
}
$linkContent .= render_title($related);
if (QubitTerm::PUBLICATION_STATUS_DRAFT_ID == $related->getPublicationStatus()->statusId) {
$linkContent .= " ({$related->getPublicationStatus()})";
}
?>
<li><?php echo link_to($linkContent, [$related, 'module' => 'informationobject']); ?></li>
<?php } ?>
<?php } ?>
<?php } ?>
<?php foreach ($resource->relationsRelatedByobjectId as $item) { ?>
<?php if (isset($item->type) && QubitTerm::RELATED_MATERIAL_DESCRIPTIONS_ID == $item->getTypeId()) { ?>
<?php if ($sf_user->isAuthenticated() || QubitTerm::PUBLICATION_STATUS_PUBLISHED_ID == $item->subject->getPublicationStatus()->statusId) { ?>
<?php
$related = $item->subject;
$linkContent = '';
if (isset($related->levelOfDescription) || isset($related->identifier)) {
if (isset($related->levelOfDescription)) {
$linkContent .= $related->levelOfDescription;
}
if (isset($related->identifier)) {
$linkContent .= (isset($related->levelOfDescription) ? ' ' : '').$related->referenceCode;
}
$linkContent .= ' - ';
}
$linkContent .= render_title($related);
if (QubitTerm::PUBLICATION_STATUS_DRAFT_ID == $related->getPublicationStatus()->statusId) {
$linkContent .= " ({$related->getPublicationStatus()})";
}
?>
<li><?php echo link_to($linkContent, [$related, 'module' => 'informationobject']); ?></li>
<?php } ?>
<?php } ?>
<?php } ?>
</ul>
</div>
</div>Note: render_title() returns HTML (e.g. <em>). This is the same pattern used successfully in fileListSuccess.php and other templates with link_to(render_title(...)).
Context and Notes
No workaround is available without a code change.
Version used
AtoM 2.10.1
Operating System and version
No response
Default installation culture
No response
PHP version
No response
Contact details
No response
Activity