Webforms not accessible when module installed

Created on 9 February 2023, almost 2 years ago
Updated 11 February 2023, almost 2 years ago

Problem/Motivation

Webform can't be accessed, when module is enabled. The following error is thrown:

TypeError: Drupal\Core\Access\AccessResult::orIf(): Argument #1 ($other) must be of type Drupal\Core\Access\AccessResultInterface, null given, called in /var/www/html/web/modules/contrib/webform/src/Plugin/WebformElementBase.php on line 918 in Drupal\Core\Access\AccessResult->orIf() (line 282 of /var/www/html/web/core/lib/Drupal/Core/Access/AccessResult.php)
#0 /var/www/html/web/modules/contrib/webform/src/Plugin/WebformElementBase.php(918): Drupal\Core\Access\AccessResult->orIf(NULL)
#1 /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(405): Drupal\webform\Plugin\WebformElementBase->Drupal\webform\Plugin\{closure}(Object(Closure), 'eca_webform')
#2 /var/www/html/web/modules/contrib/webform/src/Plugin/WebformElementBase.php(919): Drupal\Core\Extension\ModuleHandler->invokeAllWith('webform_element...', Object(Closure))
#3 /var/www/html/web/modules/contrib/webform/src/Plugin/WebformElementBase.php(712): Drupal\webform\Plugin\WebformElementBase->checkAccessRules('create', Array)
#4 /var/www/html/web/modules/contrib/webform/src/Plugin/WebformElement/TextBase.php(49): Drupal\webform\Plugin\WebformElementBase->prepare(Array, Object(Drupal\webform\Entity\WebformSubmission))
#5 /var/www/html/web/modules/contrib/webform/src/Plugin/WebformElement/TextField.php(46): Drupal\webform\Plugin\WebformElement\TextBase->prepare(Array, Object(Drupal\webform\Entity\WebformSubmission))
#6 /var/www/html/web/modules/contrib/webform/src/Plugin/WebformElementManager.php(173): Drupal\webform\Plugin\WebformElement\TextField->prepare(Array, Object(Drupal\webform\Entity\WebformSubmission))
#7 /var/www/html/web/modules/contrib/webform/src/WebformSubmissionForm.php(2572): Drupal\webform\Plugin\WebformElementManager->buildElement(Array, Array, Object(Drupal\Core\Form\FormState))
#8 /var/www/html/web/modules/contrib/webform/src/WebformSubmissionForm.php(828): Drupal\webform\WebformSubmissionForm->prepareElements(Array, Array, Object(Drupal\Core\Form\FormState))
#9 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityForm.php(106): Drupal\webform\WebformSubmissionForm->form(Array, Object(Drupal\Core\Form\FormState))
#10 /var/www/html/web/modules/contrib/webform/src/WebformSubmissionForm.php(641): Drupal\Core\Entity\EntityForm->buildForm(Array, Object(Drupal\Core\Form\FormState))
#11 [internal function]: Drupal\webform\WebformSubmissionForm->buildForm(Array, Object(Drupal\Core\Form\FormState))
#12 /var/www/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(534): call_user_func_array(Array, Array)
#13 /var/www/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(281): Drupal\Core\Form\FormBuilder->retrieveForm('webform_submiss...', Object(Drupal\Core\Form\FormState))
#14 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityFormBuilder.php(48): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\webform\WebformSubmissionForm), Object(Drupal\Core\Form\FormState))
#15 /var/www/html/web/modules/contrib/webform/src/Entity/Webform.php(1250): Drupal\Core\Entity\EntityFormBuilder->getForm(Object(Drupal\webform\Entity\WebformSubmission), 'add')
#16 /var/www/html/web/modules/contrib/webform/src/Controller/WebformEntityController.php(77): Drupal\webform\Entity\Webform->getSubmissionForm()
#17 [internal function]: Drupal\webform\Controller\WebformEntityController->addForm(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\webform\Entity\Webform))
#18 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#19 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#20 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#21 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#22 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(169): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#23 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#24 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#25 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#26 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#27 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#28 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#29 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#30 /var/www/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#31 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(713): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#32 /var/www/html/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#33 {main}

Steps to reproduce

Install the module, try to test or view a webform.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇩🇪Germany eric heydrich

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

Comments & Activities

Production build 0.71.5 2024