Taxonomy clone on Drupal 9.4.x & PHP 7.4

Created on 7 October 2022, almost 2 years ago
Updated 22 January 2023, over 1 year ago

Problem/Motivation

There are issues (1x notice & 1x warning) through the Taxonomy cloning on Drupal 9.4.x with PHP 7.4.

The taxonomy is successfully cloned but... the issues are appeared after the taxonomy clone completion.

I post the error code:


    Notice: Undefined index: fields in Drupal\entity_type_clone\Form\CloneEntityTypeData::cloneEntityTypeFinishedCallback() (line 155 of modules/contrib/entity_type_clone/src/Form/CloneEntityTypeData.php).

    Drupal\entity_type_clone\Form\CloneEntityTypeData::cloneEntityTypeFinishedCallback(1, Array, Array, '2 sec') (Line: 456)
    _batch_finished() (Line: 98)
    _batch_page(Object) (Line: 55)
    Drupal\system\Controller\BatchController->batchPage(Object)
    call_user_func_array(Array, Array) (Line: 123)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 564)
    Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 159)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
    Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 50)
    Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
    Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 709)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

    Warning: count(): Parameter must be an array or an object that implements Countable in Drupal\entity_type_clone\Form\CloneEntityTypeData::cloneEntityTypeFinishedCallback() (line 155 of modules/contrib/entity_type_clone/src/Form/CloneEntityTypeData.php).

    Drupal\entity_type_clone\Form\CloneEntityTypeData::cloneEntityTypeFinishedCallback(1, Array, Array, '2 sec') (Line: 456)
    _batch_finished() (Line: 98)
    _batch_page(Object) (Line: 55)
    Drupal\system\Controller\BatchController->batchPage(Object)
    call_user_func_array(Array, Array) (Line: 123)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 564)
    Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 159)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
    Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 50)
    Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
    Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 709)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)


Steps to reproduce

  • Choose an existing Taxonomy
  • Try to clone it.

Proposed resolution

  • Localize and resolve the issues.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Fixed

Version

1.7

Component

Code

Created by

πŸ‡§πŸ‡¬Bulgaria vuil Bulgaria πŸ‡§πŸ‡¬ πŸ‡ͺπŸ‡Ί 🌍

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024