[Solved][Drupal] Website has Encountered an Unexpected Error

| | 1 min read

While working on a Drupal 8 project we suddenly encountered this error after pushing the site to the development server. This had not occurred in our local machines which caught us off guard. A little debugging on the error log revealed the cause of this Drupal message.

If you encounter this error unexpectedly, the first thing you should do is to check the error log of the server which is what we did. However, if you do not have access to the error log it and if the issue is only occurring in a particular server after deployment then it is most likely to be a DB issue.

In our case, the server DB had a prefix that was not in our local machines. We had pushed the DB directly to the server as we were having issues with the features module. The drupal caching system was trying to retrieve some of the tables but could not find the required tables due to the presence of the prefix. All the more reason to follow the practice of code-only deployments.

Remember this is only of the server reasons for this error. Hope this helps if you pulling your hair trying to figure out the issue.

Hope this helps! Please feel free to get in touch with us if any queries.