If the node title contains only the ignore words (possible in dictionary/vocabulary sites) and the output results to a blank alias. The attached patch is the fix for this issue. Also at line 219 of pathauto.inc the $maxlength is hard coded to "128", I changed to return value of _pathauto_get_schema_alias_maxlength() which now I believe 255 in Drupal 7.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | pathauto.inc_.patch | 1.54 KB | arpeggio |
Comments
Comment #1
arpeggio commentedSorry I forgot the attachment.
Comment #2
Freso commented#631460: Prevent pathauto_cleanstring() from creating empty components
#261944: Allow users to set aliases longer than 128 if database supports it
Comment #3
arpeggio commentedIn line 214 of pathauto.inc is hard coded with 128 maximum length (per component) it prevents the alias to reach the length specified in {url_alias} table (alias field) which is now set to 255 in drupal 7. For example in admin/config/search/path/pathauto if the user set his Default path pattern (applies to all node types with blank patterns below) field to [node:title] only, all nodes' alias will still have the maximum length of 128 because the line 214 of pathauto.inc enforced it:
$maxlength = min(variable_get('pathauto_max_component_length', 100), 128);In the patch of previous post contains:
Also the patch includes the fix for #631460: Paths can end up as empty strings, but Pathauto should insert a number (or something) instead which the patch code does is to left the alias untounched to avoid blank alias if component contains only the ignore words:
Comment #4
dave reidPlease follow-up in #261944: Allow users to set aliases longer than 128 if database supports it, not this issue.
Comment #5
dave reidRestoring the major meta-data.