Drupal报告“该网站遇到意外错误。请稍后再试”

时间:2017-09-15 10:06:37

标签: drupal drupal-8

当我登录我网站的后端并单击内容选项卡或人员选项卡时,我收到错误“网站遇到意外错误。请稍后再试”。我没有改变网站上的任何核心代码只是前端主题。我的想法是Drupal需要更新到最新版本,因为它目前在8.2.5上,而且有些插件并不是最新的。

我尝试更新Drupal并且网站崩溃,我还更新了几个模块,但其中有两个模块不会更新,它们是:https://www.drupal.org/project/metataghttps://www.drupal.org/project/twig_extender

以下是PHP错误消息:

TypeError: Argument 2 passed to Drupal\views\Entity\Render\EntityFieldRenderer::render() must be an instance of Drupal\views\Plugin\views\field\Field, instance of Drupal\views\Plugin\views\field\EntityField given, called in /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/modules/views/src/Plugin/views/field/EntityField.php on line 809 in Drupal\views\Entity\Render\EntityFieldRenderer->render() (line 120 of /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/modules/views/src/Entity/Render/EntityFieldRenderer.php) 

#0 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/modules/views/src/Plugin/views/field/EntityField.php(809): Drupal\views\Entity\Render\EntityFieldRenderer->render(Object(Drupal\views\ResultRow), Object(Drupal\views\Plugin\views\field\EntityField)) 
#1 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/modules/views/src/Plugin/views/field/FieldPluginBase.php(1137): Drupal\views\Plugin\views\field\EntityField->getItems(Object(Drupal\views\ResultRow)) 
#2 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/modules/views/views.theme.inc(224): Drupal\views\Plugin\views\field\FieldPluginBase->advancedRender(Object(Drupal\views\ResultRow)) 
#3 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/lib/Drupal/Core/Theme/ThemeManager.php(287): template_preprocess_views_view_field(Array, 'views_view_fiel...', Array) 
#4 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/lib/Drupal/Core/Render/Renderer.php(435): Drupal\Core\Theme\ThemeManager->render('views_view_fiel...', Array) 
#5 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, false) 
#6 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/modules/views/src/Plugin/views/field/FieldPluginBase.php(1736): Drupal\Core\Render\Renderer->render(Array) 
#7 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/modules/views/src/Plugin/views/style/StylePluginBase.php(765): Drupal\views\Plugin\views\field\FieldPluginBase->theme(Object(Drupal\views\ResultRow)) 
#8 [internal function]: Drupal\views\Plugin\views\style\StylePluginBase->elementPreRenderRow(Array) 
#9 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/lib/Drupal/Core/Render/Renderer.php(376): call_user_func(Array, Array) 
#10 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, false) 
#11 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/modules/views/src/Plugin/views/style/StylePluginBase.php(713): Drupal\Core\Render\Renderer->render(Array) 
#12 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/modules/views/src/Plugin/views/style/StylePluginBase.php(580): Drupal\views\Plugin\views\style\StylePluginBase->renderFields(Array) 
#13 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/modules/views/src/Plugin/views/style/StylePluginBase.php(466): Drupal\views\Plugin\views\style\StylePluginBase->renderGrouping(Array, Array, true) 
#14 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php(2117): Drupal\views\Plugin\views\style\StylePluginBase->render(Array) 
#15 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/modules/views/src/ViewExecutable.php(1520): Drupal\views\Plugin\views\display\DisplayPluginBase->render() 
#16 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/modules/views/src/Plugin/views/display/Page.php(171): Drupal\views\ViewExecutable->render() 
#17 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/modules/views/src/ViewExecutable.php(1617): Drupal\views\Plugin\views\display\Page->execute() 
#18 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/modules/views/src/Element/View.php(78): Drupal\views\ViewExecutable->executeDisplay('page_1', Array) 
#19 [internal function]: Drupal\views\Element\View::preRenderViewElement(Array) 
#20 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/lib/Drupal/Core/Render/Renderer.php(376): call_user_func(Array, Array) 
#21 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, false) 
#22 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(226): Drupal\Core\Render\Renderer->render(Array, false) 
#23 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/lib/Drupal/Core/Render/Renderer.php(574): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() 
#24 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(227): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) 
#25 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(117): Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch)) 
#26 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch)) 
#27 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) 
#28 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/vendor/symfony/http-kernel/HttpKernel.php(144): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent)) 
#29 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/vendor/symfony/http-kernel/HttpKernel.php(62): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) 
#30 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#31 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#32 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#33 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#34 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#35 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#36 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#37 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/core/lib/Drupal/Core/DrupalKernel.php(652): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#38 /srv/bindings/786d3e8414d9428c9683501ffa37adf3/code/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) 
#39 {main}.

1 个答案:

答案 0 :(得分:0)

您似乎对Drupal核心更新有疑问。

  

问题在于:

     

Argument 2 passed to Drupal\views\Entity\Render\EntityFieldRenderer::render() must be an instance of Drupal\views\Plugin\views\field\Field, instance of Drupal\views\Plugin\views\field\EntityField given

     

该插件已从Field重命名为EntityField。见#2408667: Rename Field.php to EntityField.php。但是这只是提交到8.3.x,所以在更新到8.2.5期间似乎出现了问题。有些人在8.3和8.2之间洗牌?你可以尝试再次运行更新吗?

请查看详细信息:https://www.drupal.org/node/2848227