I trust that you found this blog post to be enjoyable. If you are interested in having my team handle your eCommerce setup and marketing for you, Contact Us Click here.

1: Drupal The Website Encountered an Unexpected Error. Please try again Later

1: Drupal The Website Encountered an Unexpected Error. Please try again Later

This is an most common error we get, many times on the live sites suddenly we get this error and that time we are not able to access the error reposting and the drupal logs so in that case first we need to show the proper error which we have in the website.

The above is not an error its just an simple text appears on the drupal site but the actual errors are completly different so we need to enable the debug mode then we can track the actual error and fix that...

First Solution :

Step 1: Locate to the - sites/default/services.yml file and open in any editor

Step 2: Now find these in the file -

debug:false

cache:true

Step 3: Replace the above with these

debug:true

cache:false

If still the “ Website Encountered an Unexpected Error. Please try again Later “ appearing instead of the errors then just simply follow these steps.

Second Solution :

Locate to the – sites/default/settings.php and open it in any editor

Now add this line

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

When we add this line to settings.php file then all the errors will appears properly on the webpage instead of the “ Website Encountered an Unexpected Error. Please try again Later “


Third Solution

The error levels are defined in the bootstrap.inc as follows:

- const ERROR_REPORTING_HIDE = 'hide';

- const ERROR_REPORTING_DISPLAY_SOME = 'some';

- const ERROR_REPORTING_DISPLAY_ALL = 'all';

- const ERROR_REPORTING_DISPLAY_VERBOSE = 'verbose';

These will help you to show all the errors on the webpages.


Incase, you still facing this error, feel free to contact us. We're a team of Drupal devloper.

Back to blog