From e0180c3fbfc42861965be5d07e207b7d4ed658a0 Mon Sep 17 00:00:00 2001 From: Thijs Kinkhorst <thijs@kinkhorst.com> Date: Mon, 20 Jan 2020 10:08:21 +0000 Subject: [PATCH] Fix login template when authsource has no 'name'. Template would fail because key does not exist, when default() is not immediately after it. So need to split this up. --- modules/core/templates/login.twig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/core/templates/login.twig b/modules/core/templates/login.twig index cd5b71cde..1cb4ea126 100644 --- a/modules/core/templates/login.twig +++ b/modules/core/templates/login.twig @@ -14,7 +14,11 @@ {% for id, config in sources -%} <li class="pure-menu-item"> <a href="{{ moduleURL('core/login/' ~ id|url_encode) }}" class="pure-menu-link"> - {{ config.name|translateFromArray|default(id) }} + {% if config.name is defined %} + {{ config.name|translateFromArray }} + {% else %} + {{ id }} + {% endif %} </a> </li> {% endfor -%} -- GitLab