Posted by albert_philly on September 26, 2008 at 1:11am
Jump to:
| Project: | Related links |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Zen |
| Status: | closed (fixed) |
Issue Summary
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.
| Attachment | Size |
|---|---|
| wrongurls.patch | 1.02 KB |
Comments
#1
FWIW, 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 :)
#2
I believe that this should now be fixed. Thanks for the patch :)
#3
Automatically closed -- issue fixed for 2 weeks with no activity.