path_redirect stomps url_alias

malex - October 13, 2008 - 20:30
Project:Path redirect
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Path redirect causes bad behavior in some cases where path_redirect conflicts with url_alias. Consider the following.

mysql> select * from path_redirect where path = 'somepagealias';
+-----+---------------+----------+-------+----------+------+
| rid | path          | redirect | query | fragment | type |
+-----+---------------+----------+-------+----------+------+
|   1 | somepagealias | node/4   |       |          |  301 |
+-----+---------------+----------+-------+----------+------+
1 row in set (0.01 sec)
mysql> select * from url_alias where dst = 'somepagealias';
+-----+--------+---------------+----------+
| pid | src    | dst           | language |
+-----+--------+---------------+----------+
|  93 | node/3 | somepagealias |          |
+-----+--------+---------------+----------+
1 row in set (0.00 sec)
mysql>

In this case, clicking on any of the usual links to node/3 (internally url_alias'd to somepagealias) will unexpectedly take the user to node/4.

This kind of snarl may not appear often, but it's pretty ugly when it does.

I've attached a patch showing how I fixed the problem for my own installation. I'd love to see this merged with your tree because it's a semi-big problem for my installation. So, yeah, let me know if there's anything I can do to help make that happen.

Thanks!
--Alex

AttachmentSize
no_stomp_a.diff1.21 KB

#1

Dave Reid - November 4, 2009 - 04:35
Status:active» fixed

We now warn the user if they are creating an alias that conflicts with a path.

#2

System Message - November 18, 2009 - 04:40
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.