Closed (duplicate)
Project:
Pathauto
Version:
7.x-1.x-dev
Component:
Tokens
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
8 May 2010 at 14:27 UTC
Updated:
7 Aug 2010 at 20:35 UTC
Jump to comment: Most recent file
When creating an automated path alias that uses the path token of a related node ignore words are being removed in pathauto_cleanstring.
If you had a node (node1) with a path alias set to /the-way and a bunch of nodes (sub-node) that refer to it and try to use the node1 path in their automated path alias ([node1-path]/[sub-node-title-raw]). A sub-node with "test" as the title would end up with an alias of /-way/test, instead of /the-way/test.
The pathauto_cleanstring function already takes a parameter to allow path tokens to specify that slashes should not be removed, so it should have another parameter to specify whether or not to remove the ignore words.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | pathauto-793494_2.patch | 2.73 KB | DeeLay |
| #1 | pathauto-793494.patch | 2.56 KB | DeeLay |
Comments
Comment #1
DeeLay commentedpatched against head
Comment #2
DeeLay commentedComment #3
dave reidHEAD = Drupal 7 (7.x-1.x-dev).
Instead of having more conditions like this, we should probably just combine these two parameters into one $is_path boolean parameter.
Comment #4
DeeLay commentedyeah, fair point. I guess the only reason for having 2 separate parameters is that it would allow the removal of ignore words to be bypassed without also bypassing the removal of slashes, although I can't think of a use case that would require that.
Created a new patch with 1 parameter.
Comment #6
dave reidThis patch will be superceded by #545216: Fix pathauto_cleanalias() and pathauto_cleanstring().
Comment #7
dave reid