WSOD when editing within Layout Builder

Created on 22 December 2023, 12 months ago
Updated 27 December 2023, 11 months ago

Using Drupal Version 10.1.4, Moderation Note Version: 8.x-1.0-beta5
I got a WSOD while editing and saving within the Layout Builder. The node is using Layout Overrides.

The error:
Error: Call to a member function getFieldDefinition() on array in moderation_note_preprocess_field() (line 107 of /newdrive/newhtml/hcnet1/web/modules/contrib/moderation_note/moderation_note.module).

🐛 Bug report
Status

Active

Component

Code

Created by

🇺🇸United States leisurman

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

Comments & Activities

  • Issue created by @leisurman
  • 🇮🇳India dineshkumarbollu

    Validate the $field_definition = $field_list->getFieldDefinition(); before this line check if object exits or not like

    // Check if field_list is an object and instance of FieldItemList
        if (!is_object($field_list) || !($field_list instanceof \Drupal\Core\Field\FieldItemListInterface)) {
            return;
        }
Production build 0.71.5 2024