LISE orderby custom field not working
Posted: Sat Mar 16, 2024 4:42 pm
I have a LISE instance where I’m trying to sort by custom field but for some reason whenever I add the property it’s not showing anything.
It’s a repertoire list with the song title as item title and the original performer as custom field named “interpret”. I’m simply calling it with this tag:
The summary template looks like this:
It creates two tables if the list is longer than 20 items.
Everything shows up if I don’t use the orderby property or if I’m just doing but as soon as I do orderby='custom_interpret, item_title' it doesn’t show anything and there is also no error log message, so I’m stumped.
[edit]
I also tried {$item|print_r} in the summary template and without the custom field order property it prints an array of LISEItem objects, but with the property value it shows an empty array.
I have the feeling, it’s a bug in the module.
[/edit]
It’s a repertoire list with the song title as item title and the original performer as custom field named “interpret”. I’m simply calling it with this tag:
Code: Select all
{LISERepertoire orderby='custom_interpret, item_title'}
Code: Select all
{$count=$items|count}
{$split = $count/2}
{$split = $split|round}
{if $items|count > 0}
<table>
<thead>
<tr>
<th scope="col">Originalinterpret</th>
<th scope="col">Titel</th>
</tr>
</thead>
<tbody>
<!-- items -->
{foreach $items as $item}
<!-- item -->
<tr>
<th scope="row">
{if !empty($item->fielddefs)}
{foreach $item->fielddefs as $fielddef}
{$fielddef.value}
{/foreach}
{/if}
</th>
<td>{$item->title}</td>
</tr>
<!-- item //-->
{if $count > 20 AND $item@index+1 == $split}
</tbody>
</table>
<table>
<thead>
<tr>
<th scope="col">Originalinterpret</th>
<th scope="col">Titel</th>
</tr>
</thead>
<tbody>
{/if}
{/foreach}
<!-- items //-->
</tbody>
</table>
{/if}
Everything shows up if I don’t use the orderby property or if I’m just doing
Code: Select all
orderby='item_title'
[edit]
I also tried {$item|print_r} in the summary template and without the custom field order property it prints an array of LISEItem objects, but with the property value it shows an empty array.

[/edit]