While WHMCS has now an error folder inside the templates that contains a file called internal-error.tpl this file is not used everywhere.
A simple way to reproduce the error is trying to include something invalid in a hook or module and WHMCS displays:
Oops! Something went wrong and we couldn't process your request. Please go back to the previous page and try again.
This is not using the internal-error.tpl template.
It seems this errors is deep in the PHP code that WHMCS is using when it generates a 500 error. I don't want customers to see this error when something changed in a hook or code and its giving errors.
Please allow us to customize this error page on the customer area.
The challenge here is that depending on what the error is and the scope of it, it may be significant enough to prevent WHMCS from being able to initialise and process a template for output. An error early in runtime such as in a hook file as per your suggestion is one example of such a scenario. It is for this reason that some early and blocking error conditions cannot use templates for their output while others will use the templates you see in the templates directory.
Featured Comment