? Success

User tests: Successful: Unsuccessful:

avatar mbabker
mbabker
24 Apr 2016

Summary of Changes

This PR makes it possible for the redirect plugin, when it is enabled and acting as the global exception handler, to proxy to a previously set exception handler for conditions where it isn't aiming to handle the exception (a 404 page on the site application). This enables a custom exception handler to be used consistently regardless of whether the plugin is enabled or not (right now you could set a custom exception handler but when the redirect plugin is enabled it will only call to JErrorPage::render().

Testing Instructions

Install the attached exception.zip package and enable the plg_system_exception plugin. Also enable the System - Redirect plugin. Ensure that the plugin is ordered before the redirect plugin.

Do something to cause an exception to be thrown. Prior to the patch, you'll always get Joomla's error page. After the patch you should get a "My custom error handler" page.

avatar mbabker mbabker - open - 24 Apr 2016
avatar mbabker mbabker - change - 24 Apr 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Apr 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 24 Apr 2016
Category Plugins
avatar brianteeman
brianteeman - comment - 24 Apr 2016

Is this in addition to Nik's PR or a replacement?


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

avatar mbabker
mbabker - comment - 24 Apr 2016

Unrelated technically.

avatar brianteeman
brianteeman - comment - 24 Apr 2016

Thanks for clarifying

On 24 April 2016 at 21:34, Michael Babker notifications@github.com wrote:

Unrelated technically.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#10078 (comment)

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar andrepereiradasilva andrepereiradasilva - test_item - 24 Apr 2016 - Tested successfully
avatar andrepereiradasilva
andrepereiradasilva - comment - 24 Apr 2016

I have tested this item :white_check_mark: successfully on 52bdb9d

Before patch 404: Component not found
After patch: Blank page with "My custom error handler" text


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

avatar mbabker
mbabker - comment - 24 Apr 2016

Was that 404 on the frontend or backend? Because if it's the frontend the redirect plugin should process the Exception and NOT call the test plugin's handler.

avatar andrepereiradasilva
andrepereiradasilva - comment - 24 Apr 2016

Backend

avatar SharkyKZ
SharkyKZ - comment - 25 Apr 2016

Is this only for admin? Or will it be modified for frontend? Could be used to enable custom 404 pages while retaining redirect/collect URLs functionality.

avatar mbabker
mbabker - comment - 25 Apr 2016

It's for both applications. It is NOT changing how error pages are rendered. Rather, when the redirect plugin catches an exception it does not want to process (it will only process 404 errors on the frontend), it will fall back to the exception handler it replaced. The redirect plugin will still call JErrorPage::render() for everything after that initial check to render the error page.

You can already do custom 404's if you check the error object in your error.php template.

if (($this->error->getCode()) == '404') {
    // Logic specific for a 404 page
}
avatar zero-24 zero-24 - test_item - 7 May 2016 - Tested successfully
avatar zero-24
zero-24 - comment - 7 May 2016

I have tested this item :white_check_mark: successfully on 52bdb9d

Thanks.


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

avatar zero-24 zero-24 - change - 7 May 2016
Status Pending Ready to Commit
avatar zero-24
zero-24 - comment - 7 May 2016

RTC


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

avatar joomla-cms-bot joomla-cms-bot - change - 7 May 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 7 May 2016
Milestone Added:
avatar wilsonge wilsonge - change - 7 May 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-05-07 14:13:47
Closed_By wilsonge
avatar wilsonge wilsonge - close - 7 May 2016
avatar wilsonge wilsonge - merge - 7 May 2016
avatar joomla-cms-bot joomla-cms-bot - close - 7 May 2016
avatar joomla-cms-bot joomla-cms-bot - change - 7 May 2016
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment