After enabling the module and creating a single association rule I try to delete the rule and get the error below:

"The website encountered an unexpected error. Please try again later."
After checking the logs this was the message associated with the error. please help

Location: /admin/config/civicrm/civicrm-group-roles/rule/ccn_creatives_sync/delete?destination=%2Fadmin%2Fconfig%2Fcivicrm%2Fcivicrm-group-roles

Referrer: /admin/config/civicrm/civicrm-group-roles

Message

ArgumentCountError: Too few arguments to function Drupal\civicrm_group_roles\Form\CivicrmGroupRoleRuleDeleteForm::__construct(), 0 passed in /core/lib/Drupal/Core/Form/FormBase.php on line 86 and exactly 1 expected in Drupal\civicrm_group_roles\Form\CivicrmGroupRoleRuleDeleteForm->__construct() (line 20 of /modules/civicrm_group_roles/src/Form/CivicrmGroupRoleRuleDeleteForm.php)
#0 /core/lib/Drupal/Core/Form/FormBase.php(86): Drupal\civicrm_group_roles\Form\CivicrmGroupRoleRuleDeleteForm->__construct()
#1 /core/lib/Drupal/Core/DependencyInjection/ClassResolver.php(28): Drupal\Core\Form\FormBase::create()
#2 /core/lib/Drupal/Core/Entity/EntityTypeManager.php(226): Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition()
#3 /core/lib/Drupal/Core/Entity/HtmlEntityFormController.php(82): Drupal\Core\Entity\EntityTypeManager->getFormObject()
#4 /core/lib/Drupal/Core/Controller/FormController.php(76): Drupal\Core\Entity\HtmlEntityFormController->getFormObject()
#5 [internal function]: Drupal\Core\Controller\FormController->getContentResult()
#6 /core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#7 /core/lib/Drupal/Core/Render/Renderer.php(573): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#8 /core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()
#9 /core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#10 /vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#11 /vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#12 /core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle()
#13 /core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle()
#14 /core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#15 /core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#16 /core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle()
#17 /core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#18 /vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#19 /core/lib/Drupal/Core/DrupalKernel.php(708): Stack\StackedHttpKernel->handle()
#20 /index.php(19): Drupal\Core\DrupalKernel->handle()
#21 {main}
.

CommentFileSizeAuthor
#3 issue-3294804.patch1.35 KBvangelisp

Comments

trevorforrest created an issue. See original summary.

jdelon02’s picture

I am having the same issue. I am running the 1.1.1 version.

vangelisp’s picture

StatusFileSize
new1.35 KB

Hiya. Here's a patch for this issue, it seems to resolve it.

I rewrote the way to write the status message in Drupal.
The code was tested on 1.2.0/1.2x branch on Drupal 9.4.8

jitendrapurohit’s picture

Status: Active » Fixed

Thanks for the patch @VangelisP. Have tested it successfully and merged the changes.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.