错误提示如下:
The website encountered an unexpected error. Please try again later. TypeError: Drupal\Core\Entity\EntityRepository::getTranslationFromContext(): Argument #1 ($entity) must be of type Drupal\Core\Entity\EntityInterface, null given, called in /var/www/html/web/core/modules/statistics/src/Plugin/Block/StatisticsPopularBlock.php on line 198 in Drupal\Core\Entity\EntityRepository->getTranslationFromContext() (line 93 of core/lib/Drupal/Core/Entity/EntityRepository.php). Drupal\Core\Entity\EntityRepository->getTranslationFromContext() (Line: 198) Drupal\statistics\Plugin\Block\StatisticsPopularBlock->nodeTitleList() (Line: 160) Drupal\statistics\Plugin\Block\StatisticsPopularBlock->build() (Line: 171) Drupal\block\BlockViewBuilder::preRender() call_user_func_array() (Line: 101) Drupal\Core\Render\Renderer->doTrustedCallback() (Line: 788) Drupal\Core\Render\Renderer->doCallback() (Line: 374) Drupal\Core\Render\Renderer->doRender() (Line: 446) Drupal\Core\Render\Renderer->doRender() (Line: 204) Drupal\Core\Render\Renderer->render() (Line: 479) Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 140) __TwigTemplate_ab776c2e0830e6b1f65c1509e742eec7->doDisplay() (Line: 405) Twig\Template->displayWithErrorHandling() (Line: 378) Twig\Template->display() (Line: 390) Twig\Template->render() (Line: 55) twig_render_template() (Line: 384) Drupal\Core\Theme\ThemeManager->render() (Line: 433) Drupal\Core\Render\Renderer->doRender() (Line: 204) Drupal\Core\Render\Renderer->render() (Line: 479) Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 86) __TwigTemplate_b6a5b85b1227c236aa8615cd0fd2e590->doDisplay() (Line: 405) Twig\Template->displayWithErrorHandling() (Line: 378) Twig\Template->display() (Line: 390) Twig\Template->render() (Line: 55) twig_render_template() (Line: 384) Drupal\Core\Theme\ThemeManager->render() (Line: 433) Drupal\Core\Render\Renderer->doRender() (Line: 204) Drupal\Core\Render\Renderer->render() (Line: 162) Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 580) Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 163) Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90) Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray() call_user_func() (Line: 142) Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 174) Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 81) Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58) Drupal\Core\StackMiddleware\Session->handle() (Line: 48) Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106) Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85) Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 23) Stack\StackedHttpKernel->handle() (Line: 713) Drupal\Core\DrupalKernel->handle() (Line: 19)