Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Confirmation number - max string length error

Confirmation number - max string length error 6 years 2 months ago #27405

  • Alaskan
  • Alaskan's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 110
  • Thank you received: 0
We had someone try to register for an event and they got an error in the process, related to the confirmation number "is invalid according to its datatype 'String' - The actual length is greater than the MaxLength value. Try again.

What is the max length for the confirmation number? If we enter a prefix for it, say, "EventConfirm20180221-" and DT register adds a number, say "3301" it should work but, according to this error, not if a max length is reached. So, how do we know what the max length is, especially for the custom prefix? There should be a built in limit to the custom prefix so that the total string max length is not reached, if indeed that is what this error is all about.

Thanks for some info on this, Nathan.

Please Log in or Create an account to join the conversation.

Confirmation number - max string length error 6 years 2 months ago #27407

  • nathan.dth
  • nathan.dth's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 1857
  • Karma: 19
  • Thank you received: 218
This has actually never come up before! So congrats on the longest confirmation numbers! hahaha :)

The confirmation number field is a VARCHAR(50) field in the database. That is where the limit comes into play. As UTF8 characters take 3 bytes per character, the varchar 50 limit is not simply 50 characters, but 50 bytes. Your long prefix is hitting that limit before the rest of the number is even added. You should either shorten your prefixes... OR you can modify that database table to increase the limit.

In the dtregister_users database table, change the "confirmNum" field type to VARCHAR(100) and you should be good. If you make that change, it will remain with future DT Register updates. It would not be put back to the original field type.
The following user(s) said Thank You: Alaskan

Please Log in or Create an account to join the conversation.

Nathan is no longer affiliated with DTH since the recent acquisition. You can connect with him and get any type of Joomla website help at www.JoomlaEmployee.com .

Confirmation number - max string length error 6 years 2 months ago #27409

  • Alaskan
  • Alaskan's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 110
  • Thank you received: 0
Thanks, Nathan. That makes sense. The weird thing is, the prefix and the auto generated number did not exceed 50 characters. Could it be set lower? (Haven't looked at the database property for that field yet). Could something else have caused this? Thanks.

Please Log in or Create an account to join the conversation.

Confirmation number - max string length error 6 years 2 months ago #27410

  • nathan.dth
  • nathan.dth's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 1857
  • Karma: 19
  • Thank you received: 218
Re-read what I typed. It's not a 50 character limit. It's 50 BYTES... and the characters stored are utf8, meaning they take 3 bytes per character.

Please Log in or Create an account to join the conversation.

Nathan is no longer affiliated with DTH since the recent acquisition. You can connect with him and get any type of Joomla website help at www.JoomlaEmployee.com .
  • Page:
  • 1
Time to create page: 0.098 seconds