Cron error after update

Created on 21 January 2020, almost 5 years ago
Updated 2 August 2024, 4 months ago

I hace nothing found about
i have updatet from 8.7.11 to 8.8.1

PHP
Version
7.1.33

Datenbank
Version
5.7.25
System
MySQL,

Webserver
Apache

The website encountered an unexpected error. Please try again later.
Error: Call to a member function hasPermission() on null in comment_node_update_index() (line 458 of core/modules/comment/comment.module).
comment_node_update_index(Object)
call_user_func_array('comment_node_update_index', Array) (Line: 403)
Drupal\Core\Extension\ModuleHandler->invokeAll('node_update_index', Array) (Line: 539)
Drupal\node\Plugin\Search\NodeSearch->indexNode(Object) (Line: 500)
Drupal\node\Plugin\Search\NodeSearch->updateIndex() (Line: 181)
search_cron()
call_user_func_array('search_cron', Array) (Line: 392)
Drupal\Core\Extension\ModuleHandler->invoke('search', 'cron') (Line: 236)
Drupal\Core\Cron->invokeCronHandlers() (Line: 134)
Drupal\Core\Cron->run() (Line: 75)
Drupal\Core\ProxyClass\Cron->run() (Line: 166)
Drupal\system\Form\CronForm->runCron(Array, Object)
call_user_func_array(Array, Array) (Line: 112)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 52)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 591)
Drupal\Core\Form\FormBuilder->processForm('system_cron_settings', Array, Object) (Line: 320)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 91)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 50)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 694)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

greetings

πŸ› Bug report
Status

Closed: works as designed

Version

9.5

Component
CommentΒ  β†’

Last updated 2 days ago

Created by

πŸ‡©πŸ‡ͺGermany Kisugi Ai

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ͺπŸ‡ΈSpain daniels____

    I had this error since I upgraded. Authenticated role disappeared. Then when I created role again, it works again, but I have to assign permissions again and it's not a system role. Maybe some Drupal core maintainer can check this?

  • Status changed to Needs work over 1 year ago
  • πŸ‡ͺπŸ‡ΈSpain daniels____

    I change the status to Needs work, as I think the solution is not only manually create the role Authenticated again.

  • Status changed to Closed: works as designed over 1 year ago
  • This was originally a bug report against the comment module for β€œError: Call to a member function hasPermission() on null in comment_node_update_index() (line 458 of core/modules/comment/comment.module)”. You changed this to the user module. If you are not getting that precise error open a new issue with detailed steps to reproduce. If you are getting that error, reopen this.

  • πŸ‡³πŸ‡±Netherlands Rop Rotterdam

    Getting this error on Drupal 10.3 / PHP 8.2.20
    I am not sure when it appeared. I did not notice it until trying to login again after a few days. It may have already been there before upgrading to 10.3. I did find that the role 'Authenticated' (authenticated) was missing.

    Error: Call to a member function hasPermission() on null in comment_node_update_index() (line 375 of core/modules/comment/comment.module).

    comment_node_update_index()
    call_user_func_array() (Line: 416)
    Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}() (Line: 395)
    Drupal\Core\Extension\ModuleHandler->invokeAllWith() (Line: 415)
    Drupal\Core\Extension\ModuleHandler->invokeAll() (Line: 529)
    Drupal\node\Plugin\Search\NodeSearch->indexNode() (Line: 490)
    Drupal\node\Plugin\Search\NodeSearch->updateIndex() (Line: 80)
    search_cron() (Line: 335)
    Drupal\Core\Cron->Drupal\Core\{closure}() (Line: 395)
    Drupal\Core\Extension\ModuleHandler->invokeAllWith() (Line: 318)
    Drupal\Core\Cron->invokeCronHandlers() (Line: 159)
    Drupal\Core\Cron->run() (Line: 75)
    Drupal\Core\ProxyClass\Cron->run() (Line: 65)
    Drupal\automated_cron\EventSubscriber\AutomatedCron->onTerminate()
    call_user_func() (Line: 111)
    Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 115)
    Symfony\Component\HttpKernel\HttpKernel->terminate() (Line: 66)
    Drupal\Core\StackMiddleware\StackedHttpKernel->terminate() (Line: 715)
    Drupal\Core\DrupalKernel->terminate() (Line: 22)

    Adding the Role 'Authenticated' back, seems to have helped.

  • First commit to issue fork.
Production build 0.71.5 2024