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 |
Jump to:
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
| Attachment | Size |
|---|---|
| no_stomp_a.diff | 1.21 KB |

#1
We now warn the user if they are creating an alias that conflicts with a path.
#2
Automatically closed -- issue fixed for 2 weeks with no activity.