I get this error on the Ship Packages page after hitting the Review Shipment button. A 32 character limit seems too small to me and I'm thinking this must be a bug in the system?
Does anyone have any input on this topic?
-=-
Troy Dalmasso
|
UbercartOne cart to rule them all... |
|
| Donate | Affiliates | Sponsors | ||
ERROR "E-mail cannot be longer than 32 characters..."
Submitted by Troy Dalmasso on Wed, 08/06/2008 - 13:02
I get this error on the Ship Packages page after hitting the Review Shipment button. A 32 character limit seems too small to me and I'm thinking this must be a bug in the system? Does anyone have any input on this topic? -=-
I agree that 32 characters is too small, but I don't know where the limit is coming from. I have a hard time believing I'm the only one getting this error when trying to use Ubercart.
I agree that 32 characters is too small, but I don't know where the limit is coming from.
Hi Lyle, Seems the problem is that the function uc_textfield() defaults to a #maxlength of 32. So the forms API validation generates that error for any textfield that doesn't override the default #maxlength. Two ways to fix this. Either 1) change the #maxlength default in the uc_textfield() function declaration, or 2) explicitly pass uc_textfield() a #maxlength when defining an e-mail input field on a form. The first just defers the problem, since then e-mail addresses of 64 (or 128, or whatever the new limit is) characters will still fail. The second requires reviewing *all* uses of uc_textfield() in Ubercart to ensure the default #maxlength=32 is appropriate for each use (and changing the call to pass a more appropriate #maxlength if not...). I'm sure this implicit limit affects other inputs, or at least other uses of the e-mail field, so I think it really does warrant a review of all the code to see if the same problem exists elsewhere. Thanks, TR! I cross posted, here and the Support forum, because I didn't know the cause of the issue. I will post a new comment there directing others to this thread. There is already one other user reporting the issue using google checkout. Mine is occurring using the UPS module. It should be noted that I get the issue when choosing "UPS" but not when choosing "Ship Manually" in the "Shipping method:" menu. Thanks for your reply. I'll keep an eye on this bug.
|
|
Joined: 08/06/2008