User tests: Successful: Unsuccessful:
If a full URL is redirected the fields selected from the database are "new_url", "header" and "published" but if a server-relative URL is redirected only the fields "new_url" and "published" are selected from the database.
This has two implications:
PHP Notice: Undefined property: stdClass::$header in .../plugins/system/redirect/redirect.php on line 142
This pull request changes the select with the server-relative URL such that in this case the "header" field is selected too.
How to test:
wget
(for wget
see below)Now apply the change and repeat the test, the redirection code is now 307.
Since browsers tend to cache redirections they got from a web server it is not easy to test the redirection plugin. One way is to completely clean the browser cache prior to the next test (or to remove at least all objects cached from the server used for testing).
The other way is to use the tool wget
as follows:
wget -O - --max-redirect 0 <URL>
For please substitute the redirected URL. The relevant output of this tool will look like:
HTTP request sent, awaiting response... 307 Temporary Redirect
Location: <new URL>
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Category | ⇒ | Plugins |
I have tested this item successfully on 4ae6da2
Thanks. RTC
Status | Pending | ⇒ | Ready to Commit |
Easy | No | ⇒ | Yes |
Labels |
Added:
?
|
Milestone |
Added: |
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-05-07 14:11:15 |
Closed_By | ⇒ | wilsonge |
Labels |
Removed:
?
|
Labels |
Removed:
?
|
I have tested this item successfully on 4ae6da2
I confirm the issue and this PR solves it.
How did i test.
/en/testredirect1
to/en/testredirect2
with307
HTTP status codeThanks!
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10214.