Require parameter in theme "details"

Created on 29 March 2023, almost 2 years ago
Updated 28 April 2023, over 1 year ago

Problem/Motivation

In any cases, I not at this moment what is the reason, in one project al least, the report "Modules Status (sync config files)", in the section "Package reports", throw this error:

Warning: Undefined array key "#summary_attributes" in template_preprocess_details() (line 249 of core/includes/form.inc).
template_preprocess_details(Array, 'details', Array)

Maybe it is a problem this installation in particular, because I checked in other and work properly. If I added this parameter to the render array in the module, it works properly.

Proposed resolution

Add the parameter in the "#render_array", it could be a require parameter (https://api.drupal.org/api/drupal/core%21modules%21system%21templates%21...) (file: "XrayAuditModulesPlugin.php"):

$builds[$type] = [
        '#theme' => 'details',
        '#title' => $group_info[$type]['title'],
        '#description' => $group_info[$type]['description'],
        '#attributes' => ['class' => ['package-listing']],
        '#summary_attributes' => [],
        '#children' => [
          'tables' => [
            '#theme' => 'table',
            '#header' => $headerTable,
            '#rows' => $group_modules,
          ]
        ]
      ];
    }
🐛 Bug report
Status

Fixed

Version

1.1

Component

Code

Created by

🇪🇸Spain lpeidro Madrid

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024