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 an existing node type 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 merge request implements this fix.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

puregin created an issue. See original summary.

puregin’s picture

Issue summary: View changes
puregin’s picture

Issue summary: View changes
Status: Active » Needs review
ajay_reddy’s picture

Status: Needs review » Reviewed & tested by the community
vuil’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.