Incorrect data type usage for contextual_links_roles

Created on 11 October 2023, about 1 year ago
Updated 11 July 2024, 4 months ago

Problem/Motivation

When freshly installing the module, it used the install config where contextual_links_roles is set as FALSE.
When opening the settings form, it trows an error because the field type expects an array or object and a boolean is given.

Warning: foreach() argument must be of type array|object, bool given in Drupal\Core\Render\Element\Checkboxes::valueCallback() (regel 113 van /var/www/html/web/core/lib/Drupal/Core/Render/Element/Checkboxes.php)

Steps to reproduce

  • Install the module
  • Go to the settings form at admin/config/content/layout-builder-extras-settings
  • See the error appearing

Proposed resolution

Fix the install value in the install config
Also fix the default value in the settings form when no value is given at load or save of the form

Remaining tasks

Create and review patch

User interface changes

-

API changes

-

Data model changes

Data type of the contextual_links_roles will change.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇧🇪Belgium tim-diels Belgium 🇧🇪

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024