Jump to:
| Project: | Global Redirect |
| Version: | 7.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
The path_alias_xt module dynamically expands aliases such as 'project/myproject' for 'node/7' to also include aliases such as 'project/myproject/edit' for 'node/7/edit'. This causes a redirect loop with globalredirect, because the later module is overzealous in its redirection in some instances.
Without path_alias_xt, globalredirect will take a request for 'node/7/edit' and attempt to redirect again to 'node/7/edit'. Because the new path is the same as the old path, this behavior is innocuous. As soon as path_alias_xt is involved, though, the behavior becomes undesirable, because the request is now actually for 'project/myproject/edit'. Now, when globalredirect tries to go to 'node/7/edit', the paths are different, and to 'goto' will take effect. Unfortunately, the next time around, globalredirect will try to do the same exact thing again. This is because, although the current path did change to 'node/7/edit', the request is still for 'project/myproject/edit', so globalredirect will once again try to go to 'node/7/edit', even though that is already the current path.
The solution is to make the conditional around the redirection more rigorous, so that globalredirect will not attempt to redirect from the current path to the same current path. This additional condition does not interfere with the primary operation of globalredirect -- i.e., to redirect from 'node/7' to 'project/myproject' -- because in this case the current path does not match with the desired redirect destination.
Patches for Drupal 7 and Drupal 6 versions of globalredirect attached.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| globalredirect-7.x-with-path_alias_xt.patch | 671 bytes | Test request sent | FAILED: [[SimpleTest]]: [MySQL] 294 pass(es), 104 fail(s), and 0 exception(s). | View details |
| globalredirect-6.x-with-path_alias_xt.patch | 676 bytes | Idle | FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch globalredirect-6.x-with-path_alias_xt.patch. Unable to apply patch. See the log in the details link for more information. | View details | Re-test |
Comments
#1
For what it is worth, subpath_alias works fine with globalredirect even without the above patches.
#2
The last submitted patch, globalredirect-6.x-with-path_alias_xt.patch, failed testing.
#3
Is there any interest in this issue? Please comment or close.
#4
I also have this issue. In previous 7.x-1.x-dev version all was fine.
#5
I'm interested, and I use both modules, but I have not noticed this problem with path_alias_xt with Drupal 6.
#6
The patch should pass the tests first. I'm monitoring; can commit it when it does if it's otherwise OK.
#7
I checked my projects, and I have switched to using subpath_alias everywhere. Someone else will need to drive this to completion if path_alias_xt support is desired.
#8
Postponing then. I use subpath_alias as well.
#9
globalredirect-7.x-with-path_alias_xt.patch queued for re-testing.
#10
Subpath is not made for D7, so this is still an issue for us. The Extended Path Alias module works great by itself, and even after GR is enabled. But GR will only work when EPA is turned off.
#11
The D7 version of subpath_alias is subpathauto.
#12
Last devel version of this module and the las version of sub-pathauto
When I try to go user/user-name/edit I will receive access deny