? Failure

User tests: Successful: Unsuccessful:

avatar n9iels
n9iels
8 May 2016

This Pull Request is a redo of #3780, see that PR for more information

Modifications

This PR adds a JLayout file for the callstack backtrace. The debug plugin and isis template include this layout now.
On request of @roland-d in the original PR I also add clickable links for XDebug session. If the flag xdebug.file_link_format is set in the php.ini the location link will be clickable.

Test instructions

  1. Go to the Global Configuration, system tab and enable "Debug system"
  2. Type /administrator/index.php?option=foo in the browser and you will see the following error page
    isis-error
  3. If you have XDebug you will see the following error page
    isis-error-xdebug
avatar n9iels n9iels - open - 8 May 2016
avatar n9iels n9iels - change - 8 May 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 May 2016
Labels Added: ?
avatar n9iels n9iels - change - 8 May 2016
Title
Backtrace isis
JLayout to render debug backtrace; Clickable links for XDebug
avatar n9iels n9iels - change - 8 May 2016
Title
Backtrace isis
JLayout to render debug backtrace; Clickable links for XDebug
avatar andrepereiradasilva andrepereiradasilva - test_item - 8 May 2016 - Tested successfully
avatar andrepereiradasilva
andrepereiradasilva - comment - 8 May 2016

I have tested this item :white_check_mark: successfully on d475a04


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10306.

avatar brianteeman brianteeman - change - 8 May 2016
Category Layout
avatar wilsonge
wilsonge - comment - 8 May 2016

Sorry to be a pain - but rather than putting this in the global JLayout folder can we please make it extension specific like we did for the stats layouts (https://github.com/joomla/joomla-cms/tree/staging/plugins/system/stats) - you'll need to adapt the code slightly like @phproberto did at https://github.com/joomla/joomla-cms/blob/staging/plugins/system/stats/stats.php#L279-L312

avatar andrepereiradasilva
andrepereiradasilva - comment - 8 May 2016

yes @wilsonge is right. Since this is only used when the debug plugin is enabled it should be a layout only of the debug plugin.

avatar mbabker
mbabker - comment - 8 May 2016

Sorry to be a pain - but rather than putting this in the global JLayout folder can we please make it extension specific like we did for the stats layouts

Please don't. @wilsonge JDocumentError is also using this. And at a quick glance it looks like JError::renderBacktrace() could too (I know that one's deprecated but proxying that to "current" code at least keeps things consistent).

avatar brianteeman
brianteeman - comment - 12 May 2016

Obviously this needs new unit tests

avatar n9iels
n9iels - comment - 12 May 2016

I don't have experience with unit testing :sweat_smile:
So it would be nice if someone else can correct these errors, makes a PR in my branch (https://github.com/n9iels/joomla-cms/tree/backtrace-isis) :smile:

avatar joomla-cms-bot
joomla-cms-bot - comment - 12 May 2016

This PR has received new commits.

CC: @andrepereiradasilva


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10306.

avatar joomla-cms-bot
joomla-cms-bot - comment - 12 May 2016

This PR has received new commits.

CC: @andrepereiradasilva


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10306.

avatar joomla-cms-bot
joomla-cms-bot - comment - 12 May 2016

This PR has received new commits.

CC: @andrepereiradasilva


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10306.

avatar n9iels
n9iels - comment - 13 Oct 2016

Better late than never!
I restored the checks as @mbabker suggested, travis seems to be happy now.

avatar mbabker
mbabker - comment - 13 Oct 2016

If it's not too hard can you also have JError::renderBacktrace() use this
layout? If it is, no big deal, I'd just like old and new APIs to be
consistent if possible.

Otherwise this looks good to me.

On Thursday, October 13, 2016, Niels van der Veer notifications@github.com
wrote:

Better late than never!
I restored the checks as @mbabker https://github.com/mbabker suggested,
travis seems to be happy now.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#10306 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAWfoe9ahbEtfMgeYGNlFhgUGjBVhXQBks5qzqmsgaJpZM4IZnml
.

avatar n9iels n9iels - change - 7 Dec 2016
The description was changed
avatar joomla-cms-bot joomla-cms-bot - change - 7 Dec 2016
Category Layout Layout Libraries Front End Plugins
avatar n9iels
n9iels - comment - 7 Dec 2016

I have some problems with this method in the JLayout: https://github.com/n9iels/joomla-cms/blob/d55866ca9ede1aff6652711f44f58732f09c7405/layouts/joomla/error/backtrace.php#L34

It is declared in the plugin class, but obviously the JLayout cannot find it. What is pretty why to handle this? Creating a PlgSystemDebugHelper?

@mbabker JError is deprecated so we don't have to support it. But I can give it a try if I solved the problem above ?

b46d0fa 7 Dec 2016 avatar n9iels CS
avatar mbabker
mbabker - comment - 7 Dec 2016

Yes, you'll need a helper method. It should be in the libraries though, not the debug plugin. You could probably add a method to JHtml for this.

As for JError being deprecated, well aware of that, however it's also good to proxy the deprecated code to new code to ease the transition where it makes sense. This is one of those places where in theory it should be easy to change and it results in one less inconsistency across our overall API (merging three places rendering in essence the same markup into one source is always good).

avatar mbabker
mbabker - comment - 21 May 2017

#14957 implemented this.

avatar mbabker mbabker - change - 21 May 2017
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2017-05-21 23:10:33
Closed_By mbabker
avatar mbabker mbabker - close - 21 May 2017

Add a Comment

Login with GitHub to post a comment