Needs work
Project:
Path redirect
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Mar 2010 at 09:10 UTC
Updated:
30 May 2013 at 09:49 UTC
Jump to comment: Most recent file
Comments
Comment #1
redben commentedSubscribe, having the same problem.
FWIW, i have pathauto 1.3, subpath auto and global redirects enabled
Comment #2
gregglesI'm not sure how to fix this yet, but I found this behavior:
0. Install path_redirect
1. Create a node called "original node" with the alias "original-node" and another called "monkey pants" and the path "monkey-pants"
2. Create redirect from original-node/monkeypants to the path "monkey-pants"
3. Test the redirect, it works
4. Install url_alter, subpath_alias modules.
5. The redirect no longer works because "original-node/monkeypants" is expanded to "node/1/monkeypants" before path_redirect_get_path sees it.
I looked in $_SERVER and found QUERY_STRING which is q=original-node/monkeypants and therefore can be str_replaced to get the original request.
I could also see creating an implementation of hook_url_alter_inbound that stores the $path and $path_language in a static var so that path_redirect can find them later.
Comment #3
gregglesComment #4
gregglesUpdated patch after the previous had problems with trailing slashes.
Comment #5
gregglesYet another patch - we should strip the querystring from these.
Comment #6
gregglesWrong order of trimming query string and trailing slash...
Comment #7
dave reidTesting should work now...
Comment #8
zilverdistel commentedFor my website this wasn't enough, I also had to apply the patch at http://drupal.org/node/346911#comment-2392744, concerning the Global Redirect module.
Comment #9
jsobiecki commentedPatch from #6 works for me. Thanks!
Comment #10
gregglesReroll for offset. Still applies, still works.
Comment #11
szy commentedIt still works with today's dev (2013-May-25).
(and the problem with Subpath still persists).
Thank you for the patch!
Szy.
Comment #13
mdupontFYI Patch in #10 fixed the subpath / redirect conflict caused by path_alias_xt module, so it's not a fix specific to subpath alias.