- Issue created by @weemondo
The default value for checkboxes is reverting to a string despite an array being provided in YML. If errors are being displayed this causes invalid JSON in the AJAX call which prevents layouts from being created or saved.
Example AJAX output:
Warning: foreach()argument must be of type array|object,
null given in /app/web/core/lib/Drupal/Core/Render/Element/Checkboxes.php on line 113[
{
"command": "settings",
"settings": {
"ajaxPageState": {
"theme": "admin_overrides",
As a temporary solution we can disable displaying errors.
ini_set('display_errors', FALSE);
Example configuration:
layout_hide:
title: 'Hide this layout'
description: "This layout and content will be hidden by CSS. You may wish to add an ID attribute to target this layout in Optimize or other tools."
default: []
plugin: layout_options_class_checkboxes
inline: false
options:
layout--hidden: 'Hide this layout (hidden if true).'
layout: true
regions: false
Active
1.7
Code