Message Error: Call to a member function getRoles() on null in Drupal\visitors\EventSubscriber\KernelTerminateSubscriber->onTerminate() (line 43 of /home5/jamesrom/public_html/d8/modules/visitors/src/EventSubscriber/KernelTerminateSubscriber.php) #0 [internal function]: Drupal\visitors\EventSubscriber\KernelTerminateSubscriber->onTerminate(Object(Symfony\Component\HttpKernel\Event\PostResponseEvent), 'kernel.terminat...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) #1 /home5/jamesrom/public_html/d8/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\PostResponseEvent), 'kernel.terminat...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) #2 /home5/jamesrom/public_html/d8/vendor/symfony/http-kernel/HttpKernel.php(88): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.terminat...', Object(Symfony\Component\HttpKernel\Event\PostResponseEvent)) #3 /home5/jamesrom/public_html/d8/vendor/stack/builder/src/Stack/StackedHttpKernel.php(32): Symfony\Component\HttpKernel\HttpKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\big_pipe\Render\BigPipeResponse)) #4 /home5/jamesrom/public_html/d8/core/lib/Drupal/Core/DrupalKernel.php(644): Stack\StackedHttpKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\big_pipe\Render\BigPipeResponse)) #5 /home5/jamesrom/public_html/d8/index.php(22): Drupal\Core\DrupalKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\big_pipe\Render\BigPipeResponse)) #6 {main}.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | visitors-2994716-2.patch | 1.15 KB | jigish.addweb |
Comments
Comment #2
jigish.addweb commented@tjtj, Please find my updated patch, this occurred because the $user is not found. kindly use my attached patch it will help you to resolve this error.
Thanks
Comment #4
rafuel92 commentedfixed in 8.x-2.7
Comment #5
rafuel92 commented