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.
Comment | File | Size | Author |
---|---|---|---|
#3 | contact_forms-categories_with_hyphens_fix-1681330-2.patch | 1.14 KB | aloyr |
#2 | contact_forms-categories_with_hyphens_fix-1681330-2.patch | 1.14 KB | aloyr |
Comments
Comment #1
brisho CreditAttribution: brisho commentedI'm seeing this behavior too. What's the use case for replacing the hyphen as well as the underscore?
Comment #2
aloyr CreditAttribution: aloyr commentedwell, 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.
Comment #3
aloyr CreditAttribution: aloyr commentedforgot to change the status to 'needs review'...
Comment #4
brisho CreditAttribution: brisho commentedComment #5
behindthepage CreditAttribution: behindthepage commentedOver 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
Comment #6
behindthepage CreditAttribution: behindthepage commented