Closed (fixed)
Project:
Related links
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
26 Sep 2008 at 01:11 UTC
Updated:
20 Dec 2010 at 19:50 UTC
By default, pathauto gives nodes the link /content/title-of-node. For user submitted links using the autocomplete feature, related links creates its link as node/nid.
When a user clicks on the link, they end up at /content/node/nid and a 404 error.
Patch makes two changes to use the l() function when outputting links and not use url() when inserting links into the database.
| Comment | File | Size | Author |
|---|---|---|---|
| wrongurls.patch | 1.02 KB | albert_philly |
Comments
Comment #1
kingandyFWIW, I don't think it's fair to blame this on pathauto - it's just how web browsers handle what appears to be a relative link (ie, no leading slash or protocol). If you were looking at /node/nid and clicked on a href="node/nid" link you'd find yourself at /node/node/nid ... TBH I'm surprised to find a hardcoded link like that hanging around in what is otherwise a finely-crafted module. I suspect that and the url() usage are both throwbacks to a darker time, a time when the $_GET['q'] reflected the path in the URL rather than the internal system path.
Cheers for this patch, just what I was looking for :)
Comment #2
Zen commentedI believe that this should now be fixed. Thanks for the patch :)