?
avatar PhilETaylor
PhilETaylor
21 Mar 2021

Steps to reproduce the issue

So this is a logic thing.

in com_redirects we allow the entry of an old (called Expired) Url and a New URL, in advanced mode (enabled in options) we allow a Redirect Status Code also.

Now, if you enable advanced mode, you still have the Expired URL field and the New URL field but you can select ANY valid HTTP Response code from he dropdown from 100 to 511

However, its only 300-399 that will result in the New Url being the final destination and redirected to. Its only ever REDIRECTING if its 300-399 - otherwise the redirect plugin is a RESPONSE plugin.....

So for example:

Expired URL = AAA
New URL = BBB
Redirect Status Code: HTTP/1.1 302 Found 

// Response is a redirect, a Location header is in the response leading to BBB
Expired URL = AAA
New URL = BBB
Redirect Status Code: HTTP/1.1 401 Unauthorized

// Response is NOT A REDIRECT, a Location header IS NOT in the response (correctly) and a 401 header is correctly returned.

In this second example the New URL BBB is never used, and the Redirect plugin is not actually REDIRECTING to a new URL, its acting as a Request handler and outputting custom responses.

There is nothing to guide the user (REMEMBER THINK LIKE A JOOMLA USER NOT A DEVELOPER!!) that the NEW URL is never going to be used if the Redirect Status Code is not 300-399

To resolve this?

  1. Hide the New URL field if the Redirect Status Code is outside of 300-399

or

1.1) Limit to the "Redirect Status Code" to only 300-399 valid response codes?

or

  1. Improve the help text on the New URL field in advanced mode to say something like "Enter the URL to be redirected to if the Redirect Status code is actually a redirect (300-399 code)

and/or

  1. improve the Redirect Status Code help text to be more like: "Choose the HTTP 1.1 status code to associate with the RESPONSE - note that the New Url will only be redirected to if a redirect

and

  1. Correctly rename "Redirect Status Code" to be "Response Status Code" because that is what it really is, its not a redirect if its a 404!

generic screenshot to show the screen Im talking about:

Screenshot 2021-03-21 at 21 21 20

avatar PhilETaylor PhilETaylor - open - 21 Mar 2021
avatar joomla-cms-bot joomla-cms-bot - change - 21 Mar 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 21 Mar 2021
avatar PhilETaylor PhilETaylor - change - 21 Mar 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 21 Mar 2021
avatar PhilETaylor PhilETaylor - change - 21 Mar 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 21 Mar 2021
avatar PhilETaylor PhilETaylor - change - 21 Mar 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 21 Mar 2021
avatar Ganesh163
Ganesh163 - comment - 23 Mar 2021

Updated status code
Hi @PhilETaylor. I have added a line in the help text to clearly view your point. Does this work ??

avatar PhilETaylor PhilETaylor - change - 9 Apr 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-04-09 13:52:01
Closed_By PhilETaylor
avatar PhilETaylor PhilETaylor - close - 9 Apr 2021
avatar PhilETaylor
PhilETaylor - comment - 9 Apr 2021

Add a Comment

Login with GitHub to post a comment