2017-04-07 57 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

相關問題