Fatal Error - site crashed
Dear all,
I am facing a weird issue, last night I tried to hook up commerce with product variation (which ships as part of the commerce module) and add Commerce Stock into the product variation - This also should be supported with seamless integration I believe.
But since then, my site is crashing with the below stacktrace. I am not sure what exactly the reason is but my site does not open at all now. Initially I thought it is just specific to order of logged in user but when I tried to open the site in incognito mode even then the site was not opening at all due to same stacktraced error.
Raising this as critical coz the nature of the bug is taking down the whole site.
[09-Jun-2021 04:14:40 UTC] Error: Call to a member function setFormClass() on null in /home/v7v32icafeqy/public_html/modules/commerce/modules/order/commerce_order.module on line 222 #0 /home/v7v32icafeqy/public_html/core/lib/Drupal/Core/Entity/EntityTypeManager.php(129): commerce_order_entity_type_build(Array)
#1 /home/v7v32icafeqy/public_html/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(175): Drupal\Core\Entity\EntityTypeManager->findDefinitions()
#2 /home/v7v32icafeqy/public_html/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryCachedTrait.php(22): Drupal\Core\Plugin\DefaultPluginManager->getDefinitions()
#3 /home/v7v32icafeqy/public_html/core/lib/Drupal/Core/Entity/EntityTypeManager.php(143): Drupal\Core\Plugin\DefaultPluginManager->getDefinition('user_role', false)
#4 /home/v7v32icafeqy/public_html/core/lib/Drupal/Core/Entity/EntityTypeManager.php(269): Drupal\Core\Entity\EntityTypeManager->getDefinition('user_role')
#5 /home/v7v32icafeqy/public_html/core/lib/Drupal/Core/Entity/EntityTypeManager.php(208): Drupal\Core\Entity\EntityTypeManager->getHandler('user_role', 'storage')
#6 /home/v7v32icafeqy/public_html/core/lib/Drupal/Core/Session/UserSession.php(206): Drupal\Core\Entity\EntityTypeManager->getStorage('user_role')
#7 /home/v7v32icafeqy/public_html/core/lib/Drupal/Core/Session/UserSession.php(111): Drupal\Core\Session\UserSession->getRoleStorage()
#8 /home/v7v32icafeqy/public_html/core/lib/Drupal/Core/Session/AccountProxy.php(119): Drupal\Core\Session\UserSession->hasPermission('access commerce...')
#9 /home/v7v32icafeqy/public_html/core/lib/Drupal/Core/Access/AccessResult.php(156): Drupal\Core\Session\AccountProxy->hasPermission('access commerce...')
#10 /home/v7v32icafeqy/public_html/core/modules/user/src/Access/PermissionAccessCheck.php(41): Drupal\Core\Access\AccessResult::allowedIfHasPermissions(Object(Drupal\Core\Session\AccountProxy), Array, 'OR')
#11 [internal function]: Drupal\user\Access\PermissionAccessCheck->access(Object(Symfony\Component\Routing\Route), Object(Drupal\Core\Session\AccountProxy))
#12 /home/v7v32icafeqy/public_html/core/lib/Drupal/Core/Access/AccessManager.php(159): call_user_func_array(Array, Array)
#13 /home/v7v32icafeqy/public_html/core/lib/Drupal/Core/Access/AccessManager.php(135): Drupal\Core\Access\AccessManager->performCheck('access_check.pe...', Object(Drupal\Component\Utility\ArgumentsResolver))
#14 /home/v7v32icafeqy/public_html/core/lib/Drupal/Core/Access/AccessManager.php(112): Drupal\Core\Access\AccessManager->check(Object(Drupal\Core\Routing\RouteMatch), Object(Drupal\Core\Session\AccountProxy), Object(Symfony\Component\HttpFoundation\Request), true)
#15 /home/v7v32icafeqy/public_html/core/lib/Drupal/Core/Routing/AccessAwareRouter.php(109): Drupal\Core\Access\AccessManager->checkRequest(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Session\AccountProxy), true)
#16 /home/v7v32icafeqy/public_html/core/lib/Drupal/Core/Routing/AccessAwareRouter.php(94): Drupal\Core\Routing\AccessAwareRouter->checkAccess(Object(Symfony\Component\HttpFoundation\Request))
#17 /home/v7v32icafeqy/public_html/vendor/symfony/http-kernel/EventListener/RouterListener.php(113): Drupal\Core\Routing\AccessAwareRouter->matchRequest(Object(Symfony\Component\HttpFoundation\Request))
#18 [internal function]: Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest(Object(Symfony\Component\HttpKernel\Event\GetResponseEvent), 'kernel.request', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#19 /home/v7v32icafeqy/public_html/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\GetResponseEvent), 'kernel.request', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#20 /home/v7v32icafeqy/public_html/vendor/symfony/http-kernel/HttpKernel.php(127): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.request', Object(Symfony\Component\HttpKernel\Event\GetResponseEvent))
#21 /home/v7v32icafeqy/public_html/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#22 /home/v7v32icafeqy/public_html/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#23 /home/v7v32icafeqy/public_html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#24 /home/v7v32icafeqy/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(191): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#25 /home/v7v32icafeqy/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(128): Drupal\page_cache\StackMiddleware\PageCache->fetch(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#26 /home/v7v32icafeqy/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(82): Drupal\page_cache\StackMiddleware\PageCache->lookup(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#27 /home/v7v32icafeqy/public_html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#28 /home/v7v32icafeqy/public_html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#29 /home/v7v32icafeqy/public_html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#30 /home/v7v32icafeqy/public_html/core/lib/Drupal/Core/DrupalKernel.php(708): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#31 /home/v7v32icafeqy/public_html/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#32 {main}
If a bug, provide steps to reproduce it from a clean install.