If you're using pathauto and have ... e.g. book set to

[book]/[bookpath]/[title]/[nid]

The generated aliases can quickly get very long. But the url_alias fields are only 128 characters.

Even setting them to 255 columns width is probably too narrow. But in my experience that's sufficiently wide.

CommentFileSizeAuthor
#4 path.module.gz3.58 KBanoopjohn

Comments

reikiman’s picture

Oh, the problem is that if the generated alias is too long then it fails to insert properly and afterward any attempt to visit that node results in an error.

Rejiggering the url_alias table to have wider fields fixes the problem.

nicholasthompson’s picture

Status: Active » Closed (works as designed)

1 year late - but you might need to bear this in mind:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.2

They say that a URI can be any length - however some old proxies might have trouble with ones over 255 characters. I've also heard that Google and Co aren't keen on them being more than 128.

mikeschinkel’s picture

Status: Active » Closed (works as designed)

I have spent a LOT of time researching URLs (see my Well Designed URLs Initiative) including time monitoring and participating on the URL mailing list uri@w3c.org and at this point there are very few if any proxies that can't handle longer URLs. You've got to remember that the RFC you quoted was written in 1999, and even back then they were referring to old proxies. Anytime I've seen conversation comes up regarding length of URLs in the past five years everyone has admitted that there is no longer any reasonable need to limit URLs to 128 characters.

OTOH, URLs longer than 128 character really offer poor usability for the user so I would ideally avoid them at all cost. But for a generic URL architecture that follows a set of patterns, making it possible for URLs to be longer than 128 characters would avoid situations where the pattern generates URLs longer than 128 characters and thus breaks the architecture of a site.

anoopjohn’s picture

Status: Closed (works as designed) » Active
StatusFileSize
new3.58 KB

There is another issue with the size of the edit field for editing the urls from the url_alias page in the admin/sitebuilding menu. The field has max size set as 64 char. I am using drupal 5.1 and the path module id is
; $Id: path.info,v 1.3 2006/11/21 20:55:34 dries Exp $.
I am uploading the modified path.module which alllows 128 chars while editing.

giorgio79’s picture

Status: Closed (works as designed) » Active

Any plans to making url_alias field longer than 128?

giorgio79’s picture

It seems this page is abandoned.

Since it is core, this needs to be posted to Drupal, which I did

http://drupal.org/node/262265

Check it out :)

gpk’s picture

Project: Path » Drupal core
Version: » 7.x-dev
Component: Code » path.module
Category: bug » feature

Changing issue settings.

dave reid’s picture

Status: Active » Fixed

This has been fixed already to 255 characters. Anything longer than that and you probably *shouldn't* be using such long paths. They're not good.

Status: Fixed » Closed (fixed)

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

DenII’s picture

Version: 7.x-dev » 6.19
Assigned: Unassigned » DenII
dave reid’s picture

Version: 6.19 » 7.x-dev
Assigned: DenII » Unassigned