I really need a stacktrace instead of a stupid "Error 0: Could not connect to MySQL". I've set debugging to on and error reporting to max. Any idea?

Edit: Temporary solution: Hacking Joomla core.

Edit 2: To be precise, add

echo '<pre>'; echo $this->error; echo $this->renderBacktrace(); echo '</pre>'; die;

to render() in libraries/joomla/document/error.php

Edit 3: Since the namespace change, error.php has changed location to here: libraries/src/Document/ErrorDocument.php.


As of 3.6.3, the Joomla core templates will give you the stack trace (including any nested Exceptions of the top level object that ultimately gets caught by the error handler) when the site is in debug mode. Of course, such a feature is also dependent on the template supporting it if it has a custom error.php layout.

See https://github.com/joomla/joomla-cms/pull/10964 for the relevant changes you would need to make in the error.php file.

  • I'm using 3.6.4. Strange. Local installation, no custom templates. Jan 20 '17 at 9:47

You just need to enable the Debug Mode in Global Settings and then Joomla will display the stack trace on error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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