1

After updating Drupal using drush my website says 'The website encountered an unexpected error. Please try again later'. with white screen(WSOD).

Then when I tried to rebuild-cache using drush there was a drush fatal error originating with rules module. I got it rectified by replacing rules module with 3.x dev version.

I could rebuild the cache and update database using drush. But still the wsod is there

My next move was to enable error reporting. So I added the line

$config['system.logging']['error_level'] = 'verbose'; it did not return any errors on the the screen. I like to know a debugging scenario for D8 as i faced this same issue for my another D8 installation but that was rectified after rebuilding the cache. I have came across posts by user with similar issues but reasons for their issues were different. So I strongly believe that there should be a debugging scenario that can apply to all.

4
  • Look at your Drupal error log. If there is nothing there (and sometimes there won't be, if the crash happens before Drupal can bootstrap to a level that allows it to be recorded to the DB), then you need to look at your actual server PHP and Apache error logs to find the error.
    – Jaypan
    Apr 30, 2017 at 3:23
  • Will do it and update @Jaypan Apr 30, 2017 at 3:30
  • Just enable error log and check. You will get the cause of error. Also you can check server log file for more information.
    – Prem Patel
    Apr 30, 2017 at 3:59
  • Friends Thanks got it rectified, the problem was with advaggr module. Replacing with its dev version rectified the issue Apr 30, 2017 at 4:19

3 Answers 3

4

1- Install Drush if you have not installed it already.

2- Clear cache using drush.

3- Still if you are facing issues start debugging with error logs as following.

Add the following lines to your settings.php

error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);

While editing settings.php change its default file permission to writable. And you may also add following to your settings.php

$config['system.logging']['error_level'] = 'verbose';

Additional information is available here!

4- If you see any error related to any custom/contributed module after enabling error reporting service.You may overwrite the particular module folder with its latest release or even try with its dev release

5- You can read the server log messages for additional error informations. These log files may vary as per the server configurations. Some information about the server log file available here!

1
  • Thanks for this. I just added the above line to settings.php file save and refreshed the page. It now displays the error. However can i ask if there is a way or method i can know the file and file line causing the error in drupal 8. Aug 18, 2017 at 20:42
0

Add this $config['system.logging']['error_level'] = 'verbose'; to your settings.php file pinpoints where the issue is, it worked for me, it was a database error! username!

-1

Simply run the below command to rebuild your site, when you encountered an issue "the website encountered an unexpected error. please try again later" after any new module installed with fatal error.

drush cr

enter image description here

1
  • Please read the opening post thoroughly. OP cleared cache. Which let to the error.
    – leymannx
    Jan 5, 2021 at 8:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.