Undefined array key "third_party_settings" in .../entity_type_clone/src/Controller/EntityTypeCloneController.php on line 78

Created on 13 October 2024, 2 months ago

Problem/Motivation

Soon after the batch process to clone a selected entity type starts, the process fails with an abbreviated error message.
The error message Undefined array key "third_party_settings" in .../entity_type_clone/src/Controller/EntityTypeCloneController.php on line 78 appears in the PHP logs.

Environment: Drupal 10.3.4, PHP 8.2.22

Steps to reproduce

  1. Install the entity_type_clone module.
  2. Select a the node type containing a field group and clone it.

Proposed resolution

As the PHP error message indicates, there is an attempt in EntityTypeCloneController.php to access an array $sourceDisplay using an array key 'third_party_settings'. As this key could conceivably not exist, the presence of the key should be verified before it is used to access the array.

The supplied patch implements this fix.

🐛 Bug report
Status

Active

Version

4.0

Component

Code

Created by

🇨🇦Canada puregin

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