Warning: Undefined array key "context_visibility" in layout_builder_context_form_alter()

Created on 17 May 2024, about 1 year ago

Problem/Motivation

Seeing the following warning in watchdog log:

Warning: Undefined array key "context_visibility" in layout_builder_context_form_alter() (line 33 of /app/web/modules/contrib/layout_builder_context/layout_builder_context.module)

Steps to reproduce

Not exactly sure, but I'm guessing that the block predates installation of Layout Builder Context and does not use it.

Proposed resolution

Relevant line 33:

        $contexts = is_array($configuration["context_visibility"]) ? $configuration["context_visibility"] : [];

Check if $configuration["context_visibility"] isset first.

Self-assigning until I get a MR in place.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States amanire

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