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
|
Ubercart |
|
|
|
||
|
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? -=-
Re: ERROR "E-mail cannot be longer than 32 characters..."
I agree that 32 characters is too small, but I don't know where the limit is coming from.
Lyle wrote:I agree that 32
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,
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.
Any takers?
I have a hard time believing I'm the only one getting this error when trying to use Ubercart.
Re: ERROR "E-mail cannot be longer than 32 characters..."
I saw this yesterday when trying to update the shipping. Following is the patch that makes it go away, temporarily: --- uc_shipping.module.orig 2010-02-02 18:20:17.000000000 -0800 $order_form = uc_order_pane_ship_to('edit-form', $order);
Max email length and store address, too
Two things: It looks like the maximum email address length is 254 characters, according to this fairly thorough-looking analysis: http://www.dominicsayers.com/isemail/ The maximum length of the store email address also needs to be fixed on this page, for now you can change line 619: (or replace 254 with your preferred maximum length.
Hi
Thanks for above fix - it
Hi Thanks for above fix - it worked just fine. If it helps anybody else, the fix above just fixes the 'origin' email address. You also need to go down to line 640 to fix the destination email address and substitute that with: $form['destination']['delivery_email'] = uc_textfield(uc_get_field_name('email'), $order->primary_email, FALSE, NULL, 254); Of course assuming you're making the limit 254 characters as above! Mike |
|