Backend: Disable Joomla's own way of displaying an error and getting the real PHP error shown?

2017-04-21 11:50:54

I am getting an error like this in the backend running my own extension:

Call to a member function setQuery() on null

And because I am not clairvoyant I do need some more info about where the error happened.

Can I somehow disable Joomla's own way of displaying errors and getting the real PHP error shown where I can see in what file and line the error happened?

I only need the full and real error reporting in the backend and not in the frontend of the site.

I have inserted this in my extension:

error_reporting(E_ALL);

ini_set('display_errors', TRUE);

And it does gives PHP errors in some cases but in this case it is hard to know what line is make the error because of Joomla all too simple layouted error reporting. I better like a non-layouted page with a usable error reference :-)

Try looking at your server's PHP error log files - they should be reporting the full error message, or can be configured to do so.

In Joomla, you can get addtional info by going to

  • Try looking at your server's PHP error log files - they should be reporting the full error message, or can be configured to do so.

    In Joomla, you can get addtional info by going to system - global configuration - system and turning on Debug System (the Call Stack should then point you towards the problem module/component), and also set server - error reporting to Development. Depending on the type of error, this will usually point you to the right line.

    Update

    One further thing that should work - go to /templates/system/error.php (frontend) or administrator/templates/system/error.php (backend) and add the line

    error);?>

    This should dump out all the info the error message page has. If the template you are using has an error.php file, then you'll need to add it there instead.

    Undo this after you have finished, though.

    2017-04-21 14:31:28