fix(call-script): 500 on the list page - render the category title

The list rendered item.category.name. The Category entity has no getName()
(only getTitle()), so Twig fell back to CommonEntity::__call('name'), which
throws "Method name not exists" - a 500 as soon as a script had a category.

Use the same null-guarded item.category.title pattern as the program list.
This commit is contained in:
alexandre_gain_mt3s committed 2026-11-21 21:14:50 +01:00
1 parent 4fb36eebfc
commit 2060818ac1
1 file changed
+1 -1
+1 -1
View File
@@ -93,7 +93,7 @@
{{ item.name }}
{% endif %}
</td>
<td class="visible-md visible-lg">{{ item.category.name|default('—') }}</td>
<td class="visible-md visible-lg">{{ item.category ? item.category.title : '—' }}</td>
<td>
{% if item.isPublished %}
<span class="label label-success"{% if item.publishUp or item.publishDown %} title="{{ item.publishUp ? item.publishUp|date('Y-m-d H:i') : '' }} → {{ item.publishDown ? item.publishDown|date('Y-m-d H:i') : '' }}"{% endif %}>{{ 'mt3s.call_script.list.published'|trans }}</span>