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)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fabiansierra5191 created an issue. See original summary.

fabiansierra5191’s picture

Patch added.

fabiansierra5191’s picture

Patch updated.

fabiansierra5191’s picture

FileSize
1.07 KB

Path update with alpha version.

fabiansierra5191’s picture

FileSize
1.07 KB

Path update with alpha version.

anairamzap’s picture

Assigned: jidrone » Unassigned

I can confirm that the patch in #5 solves this issue.
Without applying the patch, trying to delete a Group throws:

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)

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.

krina.addweb’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
268.34 KB
316.38 KB
363.88 KB

@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

jidrone’s picture

Status: Reviewed & tested by the community » Fixed
jidrone’s picture

Status: Fixed » Closed (fixed)