Dear developers,

at first glance this may seem like another issue duplicate about the 128 character limit for "Maximum alias length". Yet I may have found something new which may be of interest.

My site uses this pattern for all article paths: users/[author-name-raw]/[yyyy]-[mm]-[dd]-[title-raw]

The length of the dst column of the url_alias database table is set to the default value of 128.
Maximum alias length is set to 128, maximum component length is set to 100.

I was able to reproduce the following two behaviours:

The amount of characters in the generated URL based on the pattern is 18 plus the (raw) username of the author plus the (raw) title. If the title exceeds 100 characters, it gets truncated to 100 characters (according to the maximum component length). Now, if the username equals or exceeds 10 characters, so that the whole generated URL equals 128 (maximum alias length) or more, you will get a 404 after publishing the article and every time you try to open the generated URL. Once I created an article with the same title but a with a user whose username is only 9 characters long, so that the whole generated URL just equals 127, this newly created page is found after publishing the article.

If I set the maximum alias length to 127 instead of 128, the bug described in 1) is no longer reproducible. In fact, even if I use a user with a very long username (40 characters), Pathauto runs smoothly. I created an article with a user whose username was 40 characters long and the title length of the article amounted 149 characters. The URL was generated correctly and the article was accessible.

I've not checked the code myself, but maybe there's a problem if the maximum alias length is set to the exact size of the dst column's length of the url_alias database table. Maybe a control character is provoking a problem here?