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

Comments

redijedi’s picture

subscribing

tiato’s picture

I 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

jchatard’s picture

StatusFileSize
new1 KB

I had to remove a validation statment. Patch attached!

Jérémy

mrfelton’s picture

Status: Active » Needs review

patch tested and working for me. Thanks

dhalgren’s picture

but where to put the patch?

bendshead’s picture

subscribing

bendshead’s picture

patch tested and worked for me

himagarwal’s picture

delete 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.

jimmb’s picture

Thanks 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

EvanDonovan’s picture

The 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?

guillaumeduveau’s picture

Category: bug » feature
Priority: Critical » Normal
Status: Needs review » Needs work

To 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

c4rl’s picture

Another 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.

neochief’s picture

Status: Needs work » Reviewed & tested by the community

Patch from #3 works fine.

dave reid’s picture

Status: Reviewed & tested by the community » Closed (duplicate)

I'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.

frankcarey’s picture

replied on the new issue...

mrfelton’s picture

StatusFileSize
new899 bytes

Fair enough... but until then, patch updated to work with code in CVS

jenlampton’s picture

Component: User interface » Code
Category: feature » bug
Status: Closed (duplicate) » Active

I'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.

dave reid’s picture

Category: bug » feature
Status: Active » Closed (duplicate)

Actually 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.

Slovak’s picture

Views 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...

nagiek’s picture

subscribe

silentway’s picture

Yes, 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.