Cloning does not check machine name length, causing freezing batch and errors

Created on 25 September 2023, about 1 year ago
Updated 3 June 2024, 4 months ago

Problem/Motivation

Cloning does not check machine name length, causing freezing batch and errors.

batch?_format=json&id=1717&op=do

Drupal\Core\Config\Entity\Exception\ConfigEntityIdLengthException: Attempt to create a bundle with an ID longer than 32 characters: (). in Drupal\Core\Entity\EntityBase->preSave() (line 383 of /webweb/core/lib/Drupal/Core/Entity/EntityBase.php).

preceded by this warning:

Warning: Undefined property: Drupal\node\Entity\NodeType::$id in Drupal\Core\Entity\EntityBase->preSave() (line 383 of /web/core/lib/Drupal/Core/Entity/EntityBase.php)

#0 /web/core/includes/bootstrap.inc(164): _drupal_error_handler_real()
#1 /web/core/lib/Drupal/Core/Entity/EntityBase.php(383): _drupal_error_handler()
#2 /web/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php(289): Drupal\Core\Entity\EntityBase->preSave()
#3 /web/core/lib/Drupal/Core/Config/Entity/ConfigEntityBundleBase.php(83): Drupal\Core\Config\Entity\ConfigEntityBase->preSave()
#4 /web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(528): Drupal\Core\Config\Entity\ConfigEntityBundleBase->preSave()
#5 /web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(483): Drupal\Core\Entity\EntityStorageBase->doPreSave()
#6 /web/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php(257): Drupal\Core\Entity\EntityStorageBase->save()
#7 /web/core/lib/Drupal/Core/Entity/EntityBase.php(339): Drupal\Core\Config\Entity\ConfigEntityStorage->save()
#8 /web/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php(609): Drupal\Core\Entity\EntityBase->save()
#9 /web/modules/contrib/entity_type_clone/src/CloneEntityType.php(96): Drupal\Core\Config\Entity\ConfigEntityBase->save()
#10 /web/core/includes/batch.inc(296): Drupal\entity_type_clone\CloneEntityType::cloneEntityTypeData()
#11 /web/core/includes/batch.inc(138): _batch_process()
#12 /web/core/includes/batch.inc(94): _batch_do()
#13 /web/core/modules/system/src/Controller/BatchController.php(49): _batch_page()
#14 [internal function]: Drupal\system\Controller\BatchController->batchPage()
#15 /web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#16 /web/core/lib/Drupal/Core/Render/Renderer.php(592): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#17 /web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()
#18 /web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#19 /webvendor/symfony/http-kernel/HttpKernel.php(182): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#20 /webvendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#21 /web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#22 /web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#23 /web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#24 /web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#25 /web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#26 /web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#27 /web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#28 /web/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#29 /web/index.php(19): Drupal\Core\DrupalKernel->handle()
#30 {main}

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

RTBC

Version

4.0

Component

Code

Created by

🇦🇹Austria maxilein

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