I have a taxonomy term "event > ski/snowboard event", a CCK Image field that uses "[termpath-raw][yyyy]" for the filefield path setting with "Cleanup using Pathauto" checked and the pathauto configuration unchanged from default values.
I'm expecting the image to be saved at ".../event/ski-snowboard-event/2011", but it's being saved at ".../event/ski/snowboard event/2011". There are no multiple parents or categories or anything odd like that and this doesn't get stored in the url_alias, so no bad data in there, it simply doesn't seem to clean up the path.
I realise there were issues with pathauto 1.4, but having 1.5 (and token 1.15) are supposed to address these issues. I can't find any other issues that match this issue under pathauto and nothing against imagefield.
Comments
Comment #1
TJM commentedWe're having a similar problem in that [termpath] spaces in the path are not converted to hyphens with pathauto 1.5. For example, the path www.example.com/lecture 1/question 1 lacks the expected hyphens. We uninstalled pathauto 1.5 and re-installed pathauto 1.4. With pathauto 1.4, the spaces are replaced by hyphens. With pathauto 1.4 we get the expected result of www.example.com/lecture-1/question-1 for a path.
Comment #2
dave reidIf you are using Pathauto 6.x1.5, make sure you are also using Token 6.x-1.15 as well.
Comment #3
dunx commentedI am using pathauto 6.x-1.5 and token 6.x-1.15 and understand the issues of not doing so as I noted in my original post. I deleted both and re-installed them both, just to be sure. All the .info files include the correct version as does Drupal's module page.
Is there any debug I can quickly do to see what is or isn't happening?
Comment #4
dunx commentedWhat info do you need to investigate?
Comment #5
dunx commentedSetting status to "active".
Comment #6
Anonymous (not verified) commentedhad the same issue. upgraded to Token 6.x-1.15 and it worked. whew!
Comment #7
dave reid@dunx: Your issue may have to be with FileField paths, as it does kind of its own thing with tokens and emulating Pathauto replacement. You might want to move this issue into its issue queue.
Comment #8
dunx commentedMany thanks. I think you're right looking at the issue queue there. Will move.
Comment #9
dunx commentedThere is a solution of sorts here:
http://drupal.org/node/978518
Very specific and nothing to do with pathauto, but may get some people moving forwards with their sites until a proper solution is forthcoming.
Deciphered has also suggested here http://drupal.org/node/877578#comment-3556640 that the new v2 will not use Pathauto to clean strings, but CTools instead. Not sure what that means in practice or when that's expected, but at least the issue is on the agenda.
Comment #10
dunx commentedThe reason pathauto doesn't do what you expect it to do is because the string for termpath-raw could be something like "Event/Ski/Snowboard Event", where the term is "Ski/Snowboard Event". You want the path to be something like "event/skisnowboard-event", but the pathauto_clean_token_values doesn't know where to start converting the "/", so at the moment it just skips doing anything to termpath-raw and leaves it as is.
filefield_paths itself converts it to lower case though, so you'll get "event/ski/snowboard event".
My recommendation is to use just [term-raw], which will give you "skisnowboard-event" at least.
Or perhaps [term-raw][term-id] if you have multiple terms of the same name that sit in different parts of the taxonomy tree.
This isn't an issue with filefield_paths, so closing.