? ? ? Pending

User tests: Successful: Unsuccessful:

avatar asika32764
asika32764
28 Mar 2017

Pull Request re-create for #3780 .

Updated 2017

  • Added JHtmlDebug helper to render backtrace.
  • Also add xdebug link support similar to #10306 did.
  • JError::renderBacktrace() use JHtmlDebug too

Introduction

In current time, we use setError(), getError() and JError::raiseError() in component to send error message.

However, if we throw Exception, the debug plugin will not render backtrace for developer. It only work when we use JError::raiseError().

It's because we have this code in: https://github.com/joomla/joomla-cms/blob/master/plugins/system/debug/debug.php#L213

if (JDEBUG)
        {
            if (JError::getErrors())
            {
                $html[] = $this->display('errors');
            }

To detect whether display errors or not. When we throw an exception, the JError::getErrors() will return null that backtrace will not rendered.

The Modification

I added backtrace layout in layouts/error/backtrace.php and now, debug plugin & isis template both include this layout. It will help developers know how errors occurred.

How to Test

  1. Go to Global Configuration, enable the debug mode.
  2. Then type index.php?option=foo in browser, you will see the error page.

Screenshot

p2013-12-01-3

p-2014-06-14-3

avatar asika32764 asika32764 - open - 28 Mar 2017
avatar asika32764 asika32764 - change - 28 Mar 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 28 Mar 2017
Category Layout Libraries Front End Plugins
avatar asika32764 asika32764 - change - 28 Mar 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 28 Mar 2017
Category Layout Libraries Front End Plugins Layout Libraries Front End Plugins Unit Tests
avatar asika32764 asika32764 - change - 28 Mar 2017
Labels Added: ?
avatar asika32764 asika32764 - change - 28 Mar 2017
Title
[#3780][Re-create][WIP] Use JLayout to render debug backtrace and add backtrace in isis template error.php
[#3780] Use JLayout to render debug backtrace and add backtrace in isis template error.php
avatar asika32764 asika32764 - edited - 28 Mar 2017
avatar asika32764 asika32764 - edited - 28 Mar 2017
avatar asika32764 asika32764 - change - 28 Mar 2017
The description was changed
avatar asika32764 asika32764 - edited - 28 Mar 2017
avatar asika32764 asika32764 - change - 28 Mar 2017
The description was changed
avatar asika32764 asika32764 - edited - 28 Mar 2017
avatar asika32764 asika32764 - change - 28 Mar 2017
The description was changed
avatar asika32764 asika32764 - edited - 28 Mar 2017
avatar asika32764
asika32764 - comment - 28 Mar 2017

Done

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 29 Mar 2017 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 29 Mar 2017

I have tested this item successfully on c7ee7b6


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

avatar alikon alikon - test_item - 4 Apr 2017 - Tested successfully
avatar alikon
alikon - comment - 4 Apr 2017

I have tested this item successfully on c7ee7b6


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 4 Apr 2017

RTC after two successful testes.

avatar rdeutz rdeutz - change - 4 Apr 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-04-04 19:05:08
Closed_By rdeutz
Labels Added: ?
avatar rdeutz rdeutz - close - 4 Apr 2017
avatar rdeutz rdeutz - merge - 4 Apr 2017

Add a Comment

Login with GitHub to post a comment