Problem/Motivation

The administrative list template admin/admin-block-content.html.twig was reverted to a <div> based list (like Claro). This change also included a HTML ID for aria purposes:

    {% set description_id = item.title|clean_id ~ '-desc' %}
    <div class="admin-item__title" aria-details="{{ description_id }}">{{ item.title }}</div>
    <div class="admin-item__description" id="{{ description_id }}">{{ item.description }}</div>

This code fails if the item.title is a render array, because clean_id expects a string as parameter. But contrib might preprocess titles into render arrays, e.g. because we want add icons to titles.

AFAIK this problem does currently not happen with plain core, so I guess this is only minor.

Proposed resolution

Enforce the title is already stringified before passing it to |clean_id

      {% set description_id = item.title|render|clean_id ~ '-desc' %}

Issue fork gin-3375853

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

hudri created an issue. See original summary.

  • saschaeggi committed 5f87deca on 8.x-3.x authored by hudri
    Issue #3375853: WSOD when using icons in administrative lists
    
saschaeggi’s picture

Status: Active » Fixed

Makes total sense ✔️

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.