Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When you try to delete a group you got:
The website encountered an unexpected error. Please try again later.
Error: Class 'Domain' not found in domain_group_group_delete() (line 20 of modules/contrib/domain_group/domain_group.module).
domain_group_group_delete(Object)
call_user_func_array('domain_group_group_delete', Array) (Line: 403)
Drupal\Core\Extension\ModuleHandler->invokeAll('group_delete', Array) (Line: 204)
Drupal\Core\Entity\EntityStorageBase->invokeHook('delete', Object) (Line: 835)
Drupal\Core\Entity\ContentEntityStorageBase->invokeHook('delete', Object) (Line: 425)
Drupal\Core\Entity\EntityStorageBase->delete(Array) (Line: 787)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->delete(Array) (Line: 402)
Drupal\Core\Entity\EntityBase->delete() (Line: 40)
Drupal\group\Entity\Form\GroupDeleteForm->submitForm(Array, Object)
call_user_func_array(Array, Array) (Line: 111)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 51)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 590)
Drupal\Core\Form\FormBuilder->processForm('group_org_delete_form', Array, Object) (Line: 319)
Drupal\Core\Form\FormBuilder->buildForm('group_org_delete_form', Object) (Line: 93)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 582)
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: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 693)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Comment | File | Size | Author |
---|---|---|---|
#7 | Error-log.png | 363.88 KB | krina.addweb |
#7 | with_patch_on_delete.png | 316.38 KB | krina.addweb |
#7 | without_patch_on_delete.png | 268.34 KB | krina.addweb |
#5 | error_when_group_is_deleted-3068474-5.patch | 1.07 KB | fabiansierra5191 |
#2 | error_when_group_is_deleted-3068474-2.patch | 379 bytes | fabiansierra5191 |
Comments
Comment #2
fabiansierra5191 CreditAttribution: fabiansierra5191 as a volunteer and at Mobomo commentedPatch added.
Comment #3
fabiansierra5191 CreditAttribution: fabiansierra5191 as a volunteer and at Mobomo commentedPatch updated.
Comment #4
fabiansierra5191 CreditAttribution: fabiansierra5191 as a volunteer and at Mobomo commentedPath update with alpha version.
Comment #5
fabiansierra5191 CreditAttribution: fabiansierra5191 as a volunteer and at Mobomo commentedPath update with alpha version.
Comment #6
anairamzapI can confirm that the patch in #5 solves this issue.
Without applying the patch, trying to delete a Group throws:
But the group is deleted.
NOTE: No matter if the Group has a Domain set or not.
After applying the patch I can delete the Group without any errors.
Letting the "Needs Review" status as I've only tested the patch for the `8.1.0-alpha` version.
Comment #7
krina.addweb CreditAttribution: krina.addweb at AddWeb Solution Pvt. Ltd. commented@fabiansierra5191, Thanks for the patch. I tested your patch using my local with 8.x-1.0-alpha1 version and on deleting the Group, it does not throw error. PFA
Comment #9
jidrone CreditAttribution: jidrone at Mobomo for Vibrent Health commentedComment #10
jidrone CreditAttribution: jidrone at Mobomo for Vibrent Health commented