spacebase / spacebasenz

Website for SpaceBase New Zealand
http://dev-spacebasenz.pantheonsite.io/
GNU General Public License v2.0
0 stars 0 forks source link

Repeating PHP error on cron runs #375

Open treasuretron opened 4 years ago

treasuretron commented 4 years ago

In GitLab by @jayelless on Apr 30, 2019, 17:41

From merge request !291 - Private project content and create orgs again production launch

Merge completed, getting a new error on cron run

TypeError: Argument 1 passed to Drupal\group\Entity\GroupContent::loadByEntity() must implement interface Drupal\Core\Entity\ContentEntityInterface, null given, called in /app/web/modules/custom/spacebase_core/spacebase_core.module on line 563 in Drupal\group\Entity\GroupContent::loadByEntity() (line 117 of /app/web/modules/contrib/group/src/Entity/GroupContent.php) #0 /app/web/modules/custom/spacebase_core/spacebase_core.module(563): Drupal\group\Entity\GroupContent::loadByEntity(NULL) #1 /app/web/modules/custom/spacebase_core/src/Plugin/QueueWorker/ContentNotificationsBase.php(57): spacebase_core_send_new_content_notifications('spacebase_resou...', 'new_content_res...', NULL) #2 /app/web/core/lib/Drupal/Core/Cron.php(179): Drupal\spacebase_core\Plugin\QueueWorker\ContentNotificationsBase->processItem(Object(stdClass)) #3 /app/web/core/lib/Drupal/Core/Cron.php(144): Drupal\Core\Cron->processQueues() #4 /app/web/core/lib/Drupal/Core/ProxyClass/Cron.php(75): Drupal\Core\Cron->run() #5 /app/web/modules/contrib/admin_toolbar/admin_toolbar_tools/src/Controller/ToolbarController.php(235): Drupal\Core\ProxyClass\Cron->run() #6 [internal function]: Drupal\admin_toolbar_tools\Controller\ToolbarController->runCron() #7 /app/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #8 /app/web/core/lib/Drupal/Core/Render/Renderer.php(582): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber{closure}() #9 /app/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #10 /app/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #11 /app/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber{closure}() #12 /app/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #13 /app/web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #14 /app/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #15 /app/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #16 /app/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #17 /app/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #18 /app/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #19 /app/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #20 /app/web/core/lib/Drupal/Core/DrupalKernel.php(693): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #21 /app/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #22 {main}.

treasuretron commented 4 years ago

In GitLab by @jayelless on Apr 30, 2019, 18:07

mentioned in merge request !294

treasuretron commented 4 years ago

In GitLab by @jayelless on Apr 30, 2019, 18:08

Fix prepared and committed to branch 369-php-errors, along with a fix for another frequent php error.