Add ReplyNew TopicNew Poll

 Force Name Casing
#
Hey there. I saw this tweet only relatively recently and have this feature enabled on my board to the "First Letter" setting. And it's groovy, except we just had a member register with a hyphenated surname for a character, and it's removing the capitalization after the hyphen. I double-checked this myself by registering with "Testing Hyphenated-Surname" to be sure it wasn't just the member making an error. Despite registering that way, I ended up with "Testing Hyphenated-surname" on the other side of the registration form.

I was able to solve this for the member by changing the username to something interim then manually entering the correct casing in the CP. The interim was necessary since the board gave an error/didn't recognize the username as a new one when only the casing was changed.

So all of this is to say I think I found a relatively minor bug. Hopefully, this post isn't a repeat and is helpful. If it is a repeat or this isn't a bug or it isn't helpful, please do delete/archive this.
PM
#
That's a good catch! No one has reported this before.

Unfortunately, I will be honest I don't know what we can do about it right away. http://files.b1.jcink.com/html/emoticons/sad.gif the function that does this is built into the programming language itself.

I am pretty sure it does not consider anything after the first letter needing to be capitalized and "fixes" the casing. To fix this, I would have to probably write my own "capitalizer" so to speak, so it's not a "quick fix" for sure.

Only thing I don't understand is the whole non recognized name issue you mentioned, though.

signature
email: admin@jcink.com :: blog: John C.
#
QUOTE (John @ May 11 2017, 08:36 PM)
That's a good catch! No one has reported this before.


Glad I'm not spamming you with things you already know!

QUOTE
Unfortunately, I will be honest I don't know what we can do about it right away. http://files.b1.jcink.com/html/emoticons/sad.gif the function that does this is built into the programming language itself. I am pretty sure it does not consider anything after the first letter needing to be capitalized and "fixes" the casing. To fix this, I would have to probably write my own "capitalizer" so to speak, so it's not a "quick fix" for sure.


I suspected this was the case, but then I googled about the text-transform property and landed HERE and it seems like they're saying it does capitalize after a hyphen. I actually thought that it didn't, but in their example you can see it functioning that way. Perhaps this can be utilized somehow? Dunno enough about this to know if I'm being helpful or not, so I'll stop talking, haha.

QUOTE
Only thing I don't understand is the whole non recognized name issue you mentioned, though.


Do you not understand why it is happening (e.g., it's unexpected/a bug), or was my post unclear in describing it? I can describe it again in more detail or screenshot or do whatever else might be helpful. Let me know if I can be helpful.

I will add that this is an old thing I've run into many times over the last few years. Prior to me spying that tweet of yours and enabling the force casing feature, I often had to go into the CP and change casing for registered users. And I always got that error and always changed their name to something random for a hot second, then changed it to the intended username in the intended casing. Eventually, I enabled users to change their own usernames and made them do this on their own. But for them too, they had to change it to something random and THEN go back to the intended username since the system would basically say "bob smith your name is already Bob Smith" when they just tried to change the casing.
PM
#
QUOTE
Eventually, I enabled users to change their own usernames and made them do this on their own. But for them too, they had to change it to something random and THEN go back to the intended username since the system would basically say "bob smith your name is already Bob Smith" when they just tried to change the casing.


AHHH. I understand what's up with that now, and this should actually be easy to "correct." I can allow name changes to the "same name" as long as the user matches, that should not be a problem.

We might also be able to do it with CSS instead then instead of the server side with the text-transform property you linked, thanks. We use ucwords(); but I see a few solutions to this posted in the comments that I will try.

signature
email: admin@jcink.com :: blog: John C.
#
I'm glad my rambling post and links to random stuff I barely understand turned out to be useful! Hopefully this thread will yield a few fixed bugs! http://files.b1.jcink.com/html/emoticons/smile.gif
PM
#
adcaelum I just applied a fix by someone on PHP.net; and registered "john test tester-test" on here. And it fixed it to John Test Tester-Test. Let me know if you see similar when you register one on yours. It was such a mind numblingly simple fix that I don't know why I didn't think of it. :S

signature
email: admin@jcink.com :: blog: John C.
#
John, yup, I just registered with "Testing Hyphenated-Surname" and it stayed cased just like that. Victory!
PM
#
ok, I will leave this open to address the "same name" issue in the future though.

thanks!

signature
email: admin@jcink.com :: blog: John C.
#
Thank you for being such a responsive admin!
PM
#
QUOTE (adcaelum @ May 11 2017, 10:54 PM)
Thank you for being such a responsive admin!

No problem, always a pleasure, and thanks for the report!

signature
email: admin@jcink.com :: blog: John C.
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Share this topic:
« Next Oldest | Bug Reports | Next Newest »

Options Add ReplyNew TopicNew Poll