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}.

CommentFileSizeAuthor
#2 visitors-2994716-2.patch1.15 KBjigish.addweb

Comments

tjtj created an issue. See original summary.

jigish.addweb’s picture

Status: Active » Needs review
StatusFileSize
new1.15 KB

@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

rafuel92’s picture

Status: Needs review » Fixed

fixed in 8.x-2.7

rafuel92’s picture

Status: Fixed » Closed (fixed)

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