2017-04-07 97 views
0

我在浏览器左下方的所有时间都收到了此消息,即使该网站已全部正常工作。这对用户来说有点烦人。我试图用CSS隐藏它,但似乎不可能。隐藏错误:网站遇到意外错误。请稍后再试

enter image description here

你们是否知道如何隐藏错误讯息?这是来自日志文件的错误:

Error: Call to a member function getPlugins() on null in Drupal\feeds\Entity\Feed->preSave() (line 443 of /var/www/html/modules/contrib/feeds/src/Entity/Feed.php) #0 /var/www/html/core/lib/Drupal/Core/Entity/EntityStorageBase.php(434): Drupal\feeds\Entity\Feed->preSave(Object(Drupal\feeds\FeedStorage)) #1 /var/www/html/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php(298): Drupal\Core\Entity\EntityStorageBase->doPreSave(Object(Drupal\feeds\Entity\Feed)) #2 /var/www/html/core/lib/Drupal/Core/Entity/EntityStorageBase.php(389): Drupal\Core\Entity\ContentEntityStorageBase->doPreSave(Object(Drupal\feeds\Entity\Feed)) #3 /var/www/html/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(761): Drupal\Core\Entity\EntityStorageBase->save(Object(Drupal\feeds\Entity\Feed)) #4 /var/www/html/core/lib/Drupal/Core/Entity/Entity.php(364): Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object(Drupal\feeds\Entity\Feed)) #5 /var/www/html/modules/contrib/feeds/feeds.module(46): Drupal\Core\Entity\Entity->save() #6 [internal function]: feeds_cron() #7 /var/www/html/core/lib/Drupal/Core/Extension/ModuleHandler.php(391): call_user_func_array('feeds_cron', Array) #8 /var/www/html/core/lib/Drupal/Core/Cron.php(223): Drupal\Core\Extension\ModuleHandler->invoke('feeds', 'cron') #9 /var/www/html/core/lib/Drupal/Core/Cron.php(122): Drupal\Core\Cron->invokeCronHandlers() #10 /var/www/html/core/lib/Drupal/Core/ProxyClass/Cron.php(75): Drupal\Core\Cron->run() #11 /var/www/html/core/modules/automated_cron/src/EventSubscriber/AutomatedCron.php(65): Drupal\Core\ProxyClass\Cron->run() #12 /var/www/html/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): Drupal\automated_cron\EventSubscriber\AutomatedCron->onTerminate(Object(Symfony\Component\HttpKernel\Event\PostResponseEvent), 'kernel.terminat...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) #13 /var/www/vendor/symfony/http-kernel/HttpKernel.php(84): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.terminat...', Object(Symfony\Component\HttpKernel\Event\PostResponseEvent)) #14 /var/www/vendor/stack/builder/src/Stack/StackedHttpKernel.php(32): Symfony\Component\HttpKernel\HttpKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Render\HtmlResponse)) #15 /var/www/html/core/lib/Drupal/Core/DrupalKernel.php(634): Stack\StackedHttpKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Render\HtmlResponse)) #16 /var/www/html/index.php(22): Drupal\Core\DrupalKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Render\HtmlResponse)) #17 {main}.

回答

0

这似乎是一般错误,并且要解决它,您应该尝试从代码调试/跟踪问题。我从你的问题中得到的是你想要消除这个错误并且现在为用户显示,如果这是在生产环境中,你应该禁止向前端报告错误,这可以在D8中通过转到admin/config/development/logging并选择“要显示的错误消息”并保存您的配置。之后,您可以调试并跟踪此错误。

我希望这可以帮助你。

+0

看起来来自Feeds模块的问题,但目前还没有修复补丁。我已将“显示的错误消息”设置为none,但仍然显示错误。 – Tony

相关问题