Closed (fixed)
Project:
Pathauto
Version:
5.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
28 Jul 2007 at 08:38 UTC
Updated:
27 Sep 2007 at 08:11 UTC
Jump to comment: Most recent file
I have some categories that have (), - and / in their titles.
In the 5.x-2.x branch brackets are displayed as %28 and %29 and the slash is just displayed as it is - /.
Also, the hyphen (-) is for some reason displayed as %E2%80%93.
The 5.x-1.x replaced all those characters with the separator.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | pathauto_term_slash.patch | 856 bytes | greggles |
Comments
Comment #1
gregglesIf you create the url aliases manually do they show the correct values? I.e. go to http://example.com/admin/build/path/add and add the alias wit the right characters in it.
Also, did this problem show up after applying http://drupal.org/node/148804 ? If so then it's related to that and should be discussed inside of that issue.
Comment #2
wallebart commentedI read your post but I think there is a separate issue with terms with '/' in its title.
In that case Pathauto builds the path formal correct - the titles are 'imploded' as they are, separated with '/' - but not logical. The '/' in the title opens a new hierarchical level, which is mostly not intended.
Example:
- books/magazines
-- daily
- books
-- crime
gets
- books/magazines
- books/magazines/daily
- books
- books/crime
It seems that books/crime is the same path level as books/magazines but it isn't so.
To solve that (quickly) for me I patched pathauto_token_values() in pathauto.module as follows :
Maybe it will help to solve the issue.
p.s. Possibly [menupath] from Token generates the same wrong result.
Comment #3
gregglesI'm changing the title - I generally agree with henry polte's solution, though not exactly with the implementation. As you point out we'll want to do this more generally since it will affect menupath as well.
There's also a larger issue of what to do with tokens that return multiple values (like catpath, menupath, etc.) which needs to be deal with prior to finding a real solution...
Comment #4
gregglesActually, I'm now thinking that henry polte's solution is perfect. Attached patch does basically the same thing. The major changes were:
1. consistent preg_replace pattern style
2. standardized comment (capitalized first letter)
3. Replacing with separator rather than just dropping the characters
@henry polte - it would be great if you could provide patches in the typical patch format to expedite testing/reviewing.
Comment #5
gregglesCommitted to the 5.x-2.x branch. Thanks, henry polte!
Comment #6
(not verified) commentedComment #7
czeky commentedUnfortunatelly getting "vocabulary-term-subterm" when creating cathegories, even with the latest release of pathauto instead of "vocabulary/term/subterm", any chance to find help?
Many thanx
czeky
Comment #8
gregglesThe right status helps to begin ;)
Other than that if you can debug the building of the catpath token in the pathauto.module's pathauto_token_values that's the problem area.
Thanks.
Comment #9
gregglesczeky - I think your problem is probably actually http://drupal.org/node/168321 - do you have transliteration enabled? If so, it's based on that problem...
Comment #10
(not verified) commented