Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError if permission "Access CiviCRM-Backend and -API" not set #15

Open
abugey opened this issue Nov 7, 2023 · 0 comments · May be fixed by #28
Open

TypeError if permission "Access CiviCRM-Backend and -API" not set #15

abugey opened this issue Nov 7, 2023 · 0 comments · May be fixed by #28
Labels
bug Something isn't working

Comments

@abugey
Copy link

abugey commented Nov 7, 2023

If the permission "Access CiviCRM-Backend and -API" is not set, the following error occurs when trying to access the subscription form:

TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in count() (line 104 of /srv/www/htdocs/systopia-dev.w21.it/local_packages/civicrm_newsletter/src/Form/SubscriptionForm.php).

Drupal\civicrm_newsletter\Form\SubscriptionForm->buildForm()
call_user_func_array() (Line: 536)
Drupal\Core\Form\FormBuilder->retrieveForm() (Line: 283)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
Drupal\Core\Controller\FormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 592)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 704)
Drupal\Core\DrupalKernel->handle() (Line: 19)
@abugey abugey added the bug Something isn't working label Nov 7, 2023
@jensschuppe jensschuppe linked a pull request Aug 12, 2024 that will close this issue
@jensschuppe jensschuppe linked a pull request Aug 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant