Cannot enter a name with an apostrophe

12 years 11 months ago #159444 by Ornithologist
Cannot enter a name with an apostrophe was created by Ornithologist
Cannot enter a name with an apostrophe (or single quote) when registering, e.g. John O'Brian. Surprised to see nothing in forums about this except a suggestion to edit 'Field entry validation' which we tried every option and still nothing works, we get an error alert: "Please enter a valid Username. No spaces, at least 2 characters and must contain only letters and numbers."

We are hiding the username at registration as we are only using the email address (to make it easier for our members) and can see that CB creates the username from the firstname and lastname fields separated by a space... so how do we either (1) set the username to accept anything, or (2) change how the username is created so we could have it remove special characters?

Any ideas would be helpful.

Please Log in to join the conversation.

12 years 11 months ago #159494 by krileon
Replied by krileon on topic Re: Cannot enter a name with an apostrophe
Username validation can be changed by editing the field in field management and changing its validation to custom PERL regular expression and using "/.*/" (without quotes) for example. This would result in accepting any value. As far as I am aware and tests show that an apostrophe shouldn't cause any issues. Please ensure are using CB 1.4.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

12 years 11 months ago - 12 years 11 months ago #159904 by Ornithologist
Replied by Ornithologist on topic Re: Cannot enter a name with an apostrophe
Thank you for the reply, however your suggestion does not help - we already tried all every option and discovered it is not the field validation that is the problem but how the username is created when it is hidden on the registration form. Can you help us find this code so we could fix it by changing how the username is created from the first and last name fields by stripping out any strange characters.

until we can find and fix this code it looks like we need to show the username at registration.

Please Log in to join the conversation.

12 years 11 months ago - 12 years 11 months ago #160050 by krileon
Replied by krileon on topic Re: Cannot enter a name with an apostrophe
I recommend using incubator project CB Fields to adjust the username however you like before/after the registration trigger. Alternatively if you require a subscription from a user you could do this via your plans using CBSubs Fields. Only other method is to perform core edits, which we do not support and I can not provide.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

12 years 11 months ago #160073 by Ornithologist
Replied by Ornithologist on topic Re: Cannot enter a name with an apostrophe
Thank you again for the quick reply and all your help. How do we escalate this bug? How to we know if CB sees it as a bug?

We are not considering paying for upgrade to professional to look at seeing if incubator CB Fields might work for us - we have a work around already: we show the username field at registration and it works.

How would CBSubs Fields work? How would we set the Username to anything but a static value? Our test show this doesn't help anyways as we still get the error trying to register when the last name has an apostrophe in it... which makes sense because it doesn't set the field until after the payment, and we can't even get past the registration page.

Please Log in to join the conversation.

12 years 11 months ago #160181 by krileon
Replied by krileon on topic Re: Cannot enter a name with an apostrophe
This is not a bug, it is also a limitation of Joomla. You can not have apostrophes in the username. Navigate to Joomlas backend and use User Manager attempting to save useranme with an apostrophe will result in "Your username contains invalid characters or is too short.".

Using incubator project CB Fields you can change the username to whatever you want, but apostrophes are still invalid. CB Fields allows you to use substitutions such as [name] as the new fields value in addition to static content.

Easiest approach is to restore usage of Username, it is required by Joomla and CB at any rate. Clever renaming can make it more understandable for users such as renaming to "Nickname" for instance.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.185 seconds

Facebook Twitter LinkedIn