I'm ussing in 'Category path settings' Default path pattern [catpath].
I have 'Petite Robe Noir' category and the path should be 'petite-robe-noir' but it is http://www.stylesnatch.com/petiterobenoir/

CommentFileSizeAuthor
#5 hyphen_remove_default_and_warn.patch3.81 KBgreggles

Comments

greggles’s picture

You marked the status as code needs review, but didn't attach a patch. Do you have a patch to fix this?

tormu’s picture

Title: [catpath] space missing » [termpath] space missing
Status: Needs review » Active

For some reason the [catpath] was changed into "[termpath]" so had to change it in the title and on my systems..
Confirming this but, having the same problem. "blaa blaa blaa" should be "blaa[separator]blaa[separator]blaa[separator]" but is "blaablaablaa"

greggles’s picture

Just following up that I see this as well. Will look into it soon.

greggles’s picture

Title: [termpath] space missing » weird behavior if action is set to "remove" for separation character

I think that I've solved this...

So, I believe you are using the - as the separator. And I believe that in the "Punctuation Settings" you have the action of "Hyphen -" set to "Remove". If you change that to "replace with separator" then I believe it will work.

I think the "solution" to this problem lies in:
1. Making the default action for hyphen to "Replace with separator"
2. A warning if the punctuation setting for the separator character is set to remove.

greggles’s picture

Status: Active » Needs review
StatusFileSize
new3.81 KB

So, here is a patch which, among other things, performs those two actions listed in comment #4.

If you would test it out I would really appreciate it.

greggles’s picture

slight issue with this patch - in the _validate function the $action == 'remove' needs to be changed to $action == 0

idflorin’s picture

I've updated to Pathauto 5.x-2.x-dev (2007-Oct-21) and made the default action for hyphen to "Replace with separator".
The result was good: http://www.stylesnatch.com/petiterobenoir/ became http://www.stylesnatch.com/petite-robe-noir
This is the way I want my permanent links to be.
About that patch .... I'm sorry but is to complex to implement .... for me (I have almost no knowledge on php)

greggles’s picture

Status: Needs review » Fixed

No problem - thanks for the feedback. This is now fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.