- Issue created by @jcmartinez
- πΊπΈUnited States jcmartinez Raleigh, NC, USA
Solved with fix added to the related ticket.
- Status changed to Closed: outdated
8 months ago 1:47pm 28 April 2024
When cron runs, it produces an error and the notifications aren't sent.
This only happens when there are subscribers to be notified.
You will see the following error:
The website encountered an unexpected error. Please try again later.
Error: Call to a member function getPreferredLangcode() on bool in Drupal\commerce_stock_notifications\Plugin\QueueWorker\CommerceStockNotifyQueue->processItem() (line 114 of modules/contrib/commerce_stock_notifications/src/Plugin/QueueWorker/CommerceStockNotifyQueue.php).
Drupal\commerce_stock_notifications\Plugin\QueueWorker\CommerceStockNotifyQueue->processItem(Object) (Line: 183)
Drupal\Core\Cron->processQueues() (Line: 139)
Drupal\Core\Cron->run() (Line: 75)
Drupal\Core\ProxyClass\Cron->run() (Line: 59)
Drupal\system\CronController->runManually()
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
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: 169)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
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: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Closed: outdated
1.0
Code
Solved with fix added to the related ticket.