Closed (fixed)
Project:
Pathauto
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
22 Jan 2010 at 08:45 UTC
Updated:
4 Mar 2010 at 03:00 UTC
Jump to comment: Most recent file
We have forums containing Slashes in their taxonomy name.
If pathauto now creates their forum alias, the forums will contain slashes.
I open this as initial support request since i'm not sure what will be the right approach to remove them... e.g. if we need some additional token or what to do "by design".
Present alias is: [vocab-raw]/[catpath-raw]
I think a valueable default should remove the slashes from the path.
Thanks for your help
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 692348-category-name-cleanstring-D6.patch | 1.23 KB | dave reid |
| #1 | pathauto_692348_slashes.patch | 1.4 KB | miro_dietiker |
Comments
Comment #1
miro_dietikerI actually don't understand why my forum results in this result.
Issue of this seems to be [catpath-raw]
In pathauto.module around 133 i can see that slashes are getting removed for parentising.
But for the current level no slashes are being removed. So we might change the last level to:
Attached patch with str_replace (faster) and added further slash remove for clean "virtual parent" stability.
What do you think?
Comment #2
dave reidI'm probably +1 on this and change preg_replace to str_replace since it's much faster. Although part of me thinks that instead of removing slashes and replacing with empty string, it should be replaced by the separator.
Comment #3
dave reidComment #4
dave reidActually the more appropriate thing to do would to use pathauto_cleanstring().
Comment #5
miro_dietikerGenerally agree since pathauto_cleanstring does also remove slashes by default (second param TRUE)
but if we accept this we can also remove the preg_replace from the previous lines (2 up). since outer pathauto_cleanstring finally removes slashes too.
Finally code for parent terms and for current level should be identical to make it appear straight. Agree?
Well ... separators ... ;-) it's some replacement in any case containing ambiguity.
Comment #6
dave reid@mri_dietiker: That's actually already handled in #344786: Unnecessary preg_replace in pathauto_token_values.
Comment #7
dave reidCommitted to CVS in all three branches!
http://drupal.org/cvs?commit=330248
http://drupal.org/cvs?commit=330246
http://drupal.org/cvs?commit=330244