Problem/Motivation

The following errors/warnings are logged when the issue credits blocks are rendered on a page:

Notice: Undefined index: wrapper_attributes in template_preprocess_drupal_contributions__item_list() (line 78 of /app/web/modules/contrib/drupal_contributions/drupal_contributions.module).

Warning: Invalid argument supplied for foreach() in Drupal\Core\Template\Attribute->__construct() (line 82 of /app/web/core/lib/Drupal/Core/Template/Attribute.php).

Steps to reproduce

  • Add the config for an organization.
  • Place the block on a page for rendering.
  • Load the page with the blocks and then check logs (or see warnings on page)

Proposed resolution

Add check to wrapper_attributes variable.

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

zopa created an issue. See original summary.

mattdaniel’s picture

Status: Active » Reviewed & tested by the community

Code change looks good to me.

  • zopa committed 5a3b10f on 1.x
    Issue #3192171 by zopa, MattKD: Undefined index: wrapper_attributes...
zopa’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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