Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I've found that if I have a hyphen in a category's name, in this case 'app-suggestions', then the URL /contact/app-suggestions fails and reverts to /contact.
Comment | File | Size | Author |
---|---|---|---|
#11 | cf_spaces.jpg | 19.57 KB | behindthepage |
Comments
Comment #1
behindthepage CreditAttribution: behindthepage commentedThat is correct. You can't put hyphens in category names.
Regards
Geoff
Comment #2
mototribe CreditAttribution: mototribe commentedI ran into this problem too.
The category name is shown in the dropdown menu of the main form and if your category name has multiple words you have to use spaces.
That will cause the URL to contain spaces. Most browsers should be fine with spaces in URLs and if they don't it should revert to the main contact form.
Otherwise it would be nice to use a "machine_name" that is generated from the category name.
Great module, btw. I use a contact form as my default 404 error page.
Comment #3
behindthepage CreditAttribution: behindthepage commentedHi Mototribe,
This has been an issue ever since writting the module and I have finallly worked out a solution that will keep everyone happy and cater for the legacy code.
What do you think of having some radios on the setting page with the following choices?
Another ongoing issue has been the redirection. I have had people say it should go to 404 so I could have another option
If Contact Form not found go to
What do you reckon?
Regards
Geoff
Comment #4
mototribe CreditAttribution: mototribe commentedHi Geoff,
that would certainly work. In terms of user interface I've come to like the D7 way of using a "display name" and a "machine name".
Views module works that way and it's intuitive.
If a contact form isn't found I would do a 404. That's how other modules work too. Also, if you have a broken link to a specific
contact form and redirect to the main contact form you'll have users complete the task. However, the experience isn't optimal and you might
never find out that you have an incorrect link on your site.
Just my 2 cents ;-)
All the best,
UWE
Comment #5
mototribe CreditAttribution: mototribe commentedbtw, just came across this module http://drupal.org/project/machine_name, might be useful for generating a machine name if you go down that road.
Comment #6
behindthepage CreditAttribution: behindthepage commentedThanks for your 2 cents worth although I think it is probably worth than that.
I will implement those features although probably not until Christmas/New Year break. I mean what else is there to do on New Years Eve?
The display name and machine name issue is handled by the core contact module which I just extend so I probably won't be able to do anything with that but I think the changes we have discussed will solve the main problems that people have been having.
Thanks
Geoff
Comment #7
mototribe CreditAttribution: mototribe commentedexcellent, glad I could help!
Better not ask me for ideas on what to do on New Years Eve, otherwise you'll never have time to make the changes ;-)
all the best,
UWE
Comment #8
DeNelo CreditAttribution: DeNelo commentedAnother issue related to this is internationalization:
If my category has extended characters in it, for instance "Løvens Land - Børnekirken" or "Økonomi" -then the category gets stripped away from the URL and I wind up at the plain contact page.
Comment #9
behindthepage CreditAttribution: behindthepage commentedHi DeNelo,
This comment would have been better as a new issue but I have released V 7.x-1.4 which supports Internationalisation and may solve your problem. Please check it out and start a new issue if you still have the problem.
Regards
Geoff
Comment #10
generalelektrix CreditAttribution: generalelektrix commentedJust installed 1.16 for Drupal 6 today and, while testing, found out that I forgot this problem.
Of course, one solves it by simply changing line 23 this way:
//$category = str_replace(array('-', '_') , ' ' , arg(1));
$category = str_replace(array('_') , ' ' , arg(1));
But, then hyphens are common in french in person names. Example: Jo-Anne, Marie-Josée, etc. Since most of the contact forms we created are used to contact staff in our team, it's a problem here and I will always have to remember this hack when I update the module until this case is resolved.
Thank you!
Comment #11
behindthepage CreditAttribution: behindthepage commentedHi GE,
I am working on this at the moment. Please see the image attached which is the form element that I have added to the Contact Forms settings page and give me your opinion on the wording. I would like to make it as clear as possible as it can be a bit confusing and need a second opinion.
Regards
Geoff
Comment #12
generalelektrix CreditAttribution: generalelektrix commentedLooks great! Clear and simple. I will choose options 3 for sure. Don't replace spaces. Or replace them with %20? That's what browsers do with them in http requests and responses anyway.
Comment #13
behindthepage CreditAttribution: behindthepage commentedReleased 6.17 with this feature added.
Ver 7 coming soon
Regards
Geoff
Comment #14
generalelektrix CreditAttribution: generalelektrix commentedThank you very much behindthepage!
I will try it and let you know the result.
Comment #15
behindthepage CreditAttribution: behindthepage commented