?
avatar schultz-it-solutions
schultz-it-solutions
15 Mar 2017

Steps to reproduce the issue

  1. set "debug system" in global configuration to YES
  2. provoke any kind of PHP error in a backend script (e.g. call an not existing function in
    /httpdocs/administrator/components/com_banners/banners.php )
  3. call the "banners" component in the administration

Expected result

Give a general error message ("An error has occurred.") with as much information as possible.

Actual result

Gives a general error message ("An error has occurred.") and the PHP error message.
If "debug" is YES, you also get the "calling stack" shown.
What is (IMHO) missing is the actual script that is crashing and the codeline.

System information (as much as possible)

not really relevant i belief

Additional comments

script to deal with this: /httpdocs/administrator/templates/.../error.php

current code:
< ? php if ($this->debug) : ? >
< div >
< ? php echo $this->renderBacktrace(); ? >

I suggest to include the following code into
< ? php if ($this->debug) : ? >
< div >
< p >Scriptfile: < ? php echo htmlspecialchars($this->error->getFile(), ENT_QUOTES, 'UTF-8'); ? >< / p >
< p >Scriptline: < ? php echo htmlspecialchars($this->error->getLine(), ENT_QUOTES, 'UTF-8'); ?>< / p >
< / div >
< div >
< ? php echo $this->renderBacktrace(); ? >

avatar schultz-it-solutions schultz-it-solutions - open - 15 Mar 2017
avatar joomla-cms-bot joomla-cms-bot - change - 15 Mar 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 15 Mar 2017
avatar schultz-it-solutions schultz-it-solutions - edited - 15 Mar 2017
avatar schultz-it-solutions schultz-it-solutions - change - 15 Mar 2017
The description was changed
avatar schultz-it-solutions schultz-it-solutions - edited - 15 Mar 2017
avatar zero-24
zero-24 - comment - 15 Mar 2017

@schultz-it-solutions please send you changes as Pullrequest. agains the staging branch.

btw what about extending the renderBacktrace method in order to display the line / file?

Please also consider a translation string using JText::_() if you want to add text to the output ;)

avatar alikon
alikon - comment - 15 Mar 2017

if i'm not wrong should be already fixed by #14169

avatar zero-24
zero-24 - comment - 15 Mar 2017

Ok i think we can close it than here. Thanks @alikon and @schultz-it-solutions

avatar zero-24 zero-24 - change - 15 Mar 2017
The description was changed
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-03-15 11:07:07
Closed_By zero-24
avatar zero-24 zero-24 - close - 15 Mar 2017
avatar schultz-it-solutions
schultz-it-solutions - comment - 15 Mar 2017

yes - please close it!

That is what you would call "parallel invention" - I am sorry...
this issue was on my mind for at least two years, but I never actually got to investigate a solution. But now I did - only to find out that three weeks ago somebody else did the very same thing.

avatar zero-24
zero-24 - comment - 15 Mar 2017

No Problem. Thanks!

Add a Comment

Login with GitHub to post a comment