Cannot create a redirect from a currently valid path?

hiades.mx - July 30, 2009 - 17:43
Project:Path redirect
Version:6.x-1.0-beta4
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:duplicate
Description

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

#1

redijedi - August 1, 2009 - 23:24

subscribing

#2

tiato - August 3, 2009 - 04:57

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

#3

jchatard - August 3, 2009 - 12:51

I had to remove a validation statment. Patch attached!

Jérémy

AttachmentSize
valid_path.diff 1 KB

#4

mrfelton - August 4, 2009 - 16:06
Status:active» needs review

patch tested and working for me. Thanks

#5

dhalgren - August 9, 2009 - 05:50

but where to put the patch?

#6

bendshead - August 15, 2009 - 11:26

subscribing

#7

bendshead - August 15, 2009 - 11:49

patch tested and worked for me

#8

himagarwal - August 22, 2009 - 16:10

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.

#9

jimmb - August 27, 2009 - 21:09

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

#10

EvanDonovan - August 28, 2009 - 18:31

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?

#11

guix - August 31, 2009 - 07:02
Category:bug report» feature request
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

#12

c4rl - October 9, 2009 - 02:06

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.

#13

neochief - October 13, 2009 - 20:01
Status:needs work» reviewed & tested by the community

Patch from #3 works fine.

#14

Dave Reid - October 26, 2009 - 18:06
Status:reviewed & tested by the community» 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.

#15

frankcarey - October 28, 2009 - 23:12

replied on the new issue...

#16

mrfelton - November 11, 2009 - 18:51

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

AttachmentSize
535798-path-redirect-valid-path.diff 899 bytes

#17

jenlampton - November 14, 2009 - 00:44
Component:User interface» Code
Category:feature request» bug report
Status: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.

#18

Dave Reid - November 14, 2009 - 04:03
Category:bug report» feature request
Status:active» 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.

#19

slovak - December 5, 2009 - 06:20

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

 
 

Drupal is a registered trademark of Dries Buytaert.