How to get rid of error messages in Joomla?
If you are an administrator of a Joomla website, sooner or later you may experience some unwanted messages which may appear anywhere on any page. For sure you would like to know what they mean and how to get rid of them.
Why do I see error messages?
Joomla core, templates and extensions are created in PHP language. If PHP error reporting is enabled on your server by default and there are any problems with PHP code on your website, this will result in displaying of an error message. Joomla error reporting is very useful for web-developers because it tells them what is the issue and where to look for it. On a production site there is no need to have error reporting enabled because most of errors should not have any impact on your website functionality and you probably do not want to show them to your visitors.
Types of error messages
You may encounter on your website the following types of error messages:
STRICT STANDARDS, for example:
Strict Standards: Non-static method … on line XX
NOTICE, for example:
Notice: Undefined property … on line XX
WARNING, for example:
Warning: … failed ... on line XX
Warning: … expected to be a reference, value given in ... on line XX
ERROR, for example:
Parse error: syntax error … on line XX
Fatal error: Allowed memory size of .. on line XX
Fatal error: Call to undefined .. on line XX
The PHP errors related to STRICT STANDARDS and NOTICE messages are the least important. Usually they have no influence on the functionality of your website and will not halt any script. In the case of WARNINGS they are more serious but they also should not break your website. The things are different when it comes to ERRORS, if any of them will appear on your website you will probably see a blank page and the website will be broken.
How to turn off error reporting?
Joomla has an option that allows to control the level of error reporting on your website. If you would like to disable or to change the level of error reporting you need to navigate in your Joomla back-end to:
System -> Global Configuration -> Server
You will see the following settings for Error Reporting option:
- System Default: Error reporting will be inherited from your server settings.
- None: Disable error reporting.
- Simple: Error reporting will show errors and warnings only.
- Maximum: Error reporting will show errors, warnings, notices, deprecated functions and strict standards.
- Development: Error reporting will show every possible error.
If you would like to overwrite your server settings and completely disable Error Reporting, you should choose the None setting. Do not forget to save your changes!