Remove pm_thread_access_time and pm_thread_delete_time from AdminUninstallForm

Created on 31 July 2023, over 1 year ago
Updated 5 August 2023, over 1 year ago

Problem/Motivation

When using /admin/config/private-message/uninstall to prepare uninstallation for the module, the Uninstallation Preparation will fail:

An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /en/batch?id=21&op=do_nojs&op=do
StatusText: Internal Server Error
ResponseText: The website encountered an unexpected error. Please try again later.Drupal\Component\Plugin\Exception\PluginNotFoundException: The "pm_thread_access_time" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 139 of core/lib/Drupal/Core/Entity/EntityTypeManager.php). Drupal\Core\Entity\EntityTypeManager->getHandler('pm_thread_access_time', 'storage') (Line: 192)
Drupal\Core\Entity\EntityTypeManager->getStorage('pm_thread_access_time') (Line: 515)
Drupal::entityQuery('pm_thread_access_time') (Line: 116)
Drupal\private_message\Form\AdminUninstallForm::deletePrivateMessageAccessTimes(Array) (Line: 295)
_batch_process() (Line: 137)
_batch_do() (Line: 93)
_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: 580)
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: 169)
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: 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: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

This is likly because the Uninstall From tries to uninstall the Entity-Types pm_thread_access_time and pm_thread_delete_time, which do not exist in the current version.

Steps to reproduce

Go to /admin/config/private-message/uninstall and press "Delete all private message content".

Proposed resolution

Remove deletePrivateMessageAccessTimes and deletePrivateMessageDeleteTimes from AdminUninstallForm.

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇩🇪Germany RobinCS

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

Comments & Activities

Production build 0.71.5 2024