commit da23178 from 03/28/12 replaced this:

$category = str_replace(  '_' , ' ' , arg(1));

with this:

$category = str_replace(array('-', '_') , ' ' , arg(1));

which, in essence, breaks all the links to categories that have hyphens in them. I have a couple of pretty good sized sites that where we don't post the contact form to a person, but to either a position or a distribution list, so our categories are titled - , like, say "Human Resources - Learning Development" or something like that. When we upgraded not long ago, this change broke those links and they now redirect to /contact, confusing the site visitor. I am considering between updating all our pages to conform to the new code or changing the source code for the contact forms module, which goes against our principles...

I can't imagine I have the only 2 instances of this use case scenario. Can we consider changing that str_replace back to how it was?

Thanks.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

brisho’s picture

I'm seeing this behavior too. What's the use case for replacing the hyphen as well as the underscore?

aloyr’s picture

well, after talking to our folks, what we've done is change the module source code on the category conversion part of the url. I think it is fine to leave the current str_replace for the subject field.

patch code is attached for consideration.

Thanks.

aloyr’s picture

Status: Active » Needs review
FileSize
1.14 KB

forgot to change the status to 'needs review'...

brisho’s picture

Status: Needs review » Reviewed & tested by the community
behindthepage’s picture

Over the 6 years that this module has been available the most requests I have had was to change the space token from an underscore to a dash and this was implemented in Version 6 on March 2008. Submitting a patch that reverts to a version over 3 years old is not helpful. Any changes to the module must take into account that people are using dashes and underscores in their sites. A patch along the lines of this issue or further comments would be more useful. http://drupal.org/node/1300728

Regards
Geoff

behindthepage’s picture

Status: Reviewed & tested by the community » Closed (duplicate)