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
- Install the entity_type_clone module.
- 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.
Issue fork entity_type_clone-3480412
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
Comment #3
puregin commentedComment #4
puregin commentedComment #5
ajay_reddyComment #6
vuil