drupal 8 coreをインストールしています(標準プロファイルを使用)。例外やエラーが発生するたびに、"The website has encountered an error.と書かれた空白のページが表示されます。Please try again later." (as below image) text and no details/trace about error.と表示された空白のページが表示されます。
画像はこちら]1です。
開発サイトでは、settings.php
ファイル内の以下の行をアンコメントすることをお勧めします。 emacs sites/default/settings.php
を参照してください。
if (file_exists(__DIR__ . '/settings.local.php')) {
include __DIR__ . '/settings.local.php';
}
そして、example.settings.local.php
を /sites
フォルダから /sites/default
フォルダにコピーして、settings.local.php
にリネームしてください。
cp sites/example.settings.local.php sites/default/settings.local.php
さらに、以下の設定を追加してください。
$config['system.logging']['error_level'] = 'verbose';
は、デバッグや開発を容易にするために、他のいくつかの設定も追加しています。もし、これらの設定が特に必要なければ、いつでもコメントアウトすることができます。
Note : 各ページに file_exists
の呼び出しを追加するとサイトの動作が遅くなると思うのであれば、プロダクションコードでいつでも削除することができます。
settings.php ファイルに以下の行を追加します。
$config['system.logging']['error_level'] = 'verbose';
詳しくは、Make developer tricks / tools for D8 more discoverable/obvious をご覧ください。