Hi there
We are using Path redirect to redirect members of a site from og nodes (groups) to panel pages where we redesign the whole thing to simulate the group's home page with news, popular topics, members and all that stuff.
It worked for the first groups we created, but now I need another redirect for a newer group we just created and it just wont let me.
It just shows up the next warning: "You cannot create a redirect from a currently valid path."
I'm trying to create the next redirect:
node/19
to
groups/groupname/home
Do you have any ideas why is it doing this?
I'm using Path 6.x-1.0-beta4 and Drupal 6.13
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | 535798-path-redirect-valid-path.diff | 899 bytes | mrfelton |
| #3 | valid_path.diff | 1 KB | jchatard |
Comments
Comment #1
redijedi commentedsubscribing
Comment #2
tiato commentedI am having the same trouble with a simple redirect..
from-> node/55
to-> node/36
Admittedly we don't use many redirects on our site but the few we set prior to updating to 6.x-1.0-beta4 work properly
Comment #3
jchatard commentedI had to remove a validation statment. Patch attached!
Jérémy
Comment #4
mrfelton commentedpatch tested and working for me. Thanks
Comment #5
dhalgren commentedbut where to put the patch?Comment #6
bendshead commentedsubscribing
Comment #7
bendshead commentedpatch tested and worked for me
Comment #8
himagarwal commenteddelete line 201, 202, 203 in path_redirect.admin.inc file or use "//" without quotes in front of line 201, 202, 203. This is the same thing that above patch has done.
Comment #9
jimmb commentedThanks himagarwal for that post! I don't know how to do a patch, but it was very easy to uncomment those lines. And now the problem that was driving me crazy is solved :)
Cheers,
Jim
Comment #10
EvanDonovan commentedThe patch works great for creating redirects from system paths (as long as they don't have aliases). Are there any possible ill effects from the patch, or can this be applied?
Comment #11
guillaumeduveauTo the maintainers : it would be nice to allow to add redirect for valid system paths as well. Sometimes you have a global architecture that works well in the majority of cases, but you also have special cases in which you have to redirect some things.
Redirecting valid system paths can have desastrous consequences, like redirecting /user, so maybe this could be added as an admin setting of path_redirect ? Let me know what you think about it and I can then provide a patch.
Note : to redirect /node/X to /node/Y you can also use cck_redirection
Comment #12
c4rl commentedAnother consequence is if a redirect is created for a path that does not yet exist on the site, but potentially will someday.
For example, if your site is brand new, and no nodes have been created, you can create redirects for node/1, node/4, node/N etc.
I believe the core path module also suffers from this phenomenon, but haven't checked the issue queue thoroughly. It appears to be a worse problem, as I don't believe it does a menu_get_item() check. You could imagine creating system paths like 'logout' as a node alias.
Comment #13
neochief commentedPatch from #3 works fine.
Comment #14
dave reidI'd much rather approve #615008: "Forced" path redirect - override the existing path or alias. I could loosen this up at least that you can't create redirects for paths that the current user doesn't have access to, like user/logout, etc. Let's work on a safer solution.
Comment #15
frankcarey commentedreplied on the new issue...
Comment #16
mrfelton commentedFair enough... but until then, patch updated to work with code in CVS
Comment #17
jenlamptonI'm getting this error even when the path is NOT currently "valid". Use case: a view with taxonomy term arguments. A term changes, the old path with the old term needs to be 301 redirected to the new term. This version of url_redirect won't let that redirect in.
Comment #18
dave reidActually in that case it's still a valid path since it's handled by the view and wouldn't normally result in a direct 404 from Drupal's menu system, so this is still a duplicate. The issue linked would also solve this problem.
Comment #19
Slovak commentedViews is the most likely culprit - change the view display path temporarily, create redirects, then set the view display back to the original path.
Detailed post at http://peterpetrik.com/blog/2009/10/override-existing-path-with-path-red...
Comment #20
nagiek commentedsubscribe
Comment #21
silentway commentedYes, this workaround worked for me. To add to #19's info, this works for other situations besides Views... Turn off the module that created the system-generated URL temporarily. Then make your redirect, and turn the module back on.
I wanted to create a redirect to /forum. Couldn't do it until I turned off Forum module.