Posted by killes@www.drop.org on March 23, 2007 at 9:33pm
| Project: | Location |
| Version: | 6.x-3.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | killes@www.drop.org |
| Status: | closed (fixed) |
Issue Summary
The database allows 255 chars for city, street, etc, but FAPI tries to restrict this. No good reason to do that, IMO.
| Attachment | Size |
|---|---|
| no_maxlength.patch | 1.73 KB |
Comments
#1
Applied to DRUPAL-5 branch. Thanks for the patch.
#2
#3
#maxlength=64 is still in use for those fields in 6.x. Reopening and reassigning. There's no good reason to limit the form field to 64 for name/street/additional/city when 255 is allowed in db...
#4
+1 encountered this too and it's annoying :) for now working with webdeveloper toolbar in Firefox to unset the maxlength...
#5
New patch for 6.x-3.x-dev.
#6
code looks good, just removes the lines as in the previously committed to 5.x patch. (I did not try to apply it to the current dev, I just looked at the patch)
I did check the cvs repository for 6 and those max lines are still in them, so it looks like this is needed.
#7
Tested patch in #5, applied cleanly ;-)
#8
As the default #maxlength of a textfield is 128, you might want to keep the property and set it to 255.
#9
True enough, here is a patch to do it that way, let the maintainer decide ;-)
#10
+++ location.module 26 Jun 2010 09:10:28 -0000@@ -603,7 +603,7 @@ function location_locationapi(&$obj, $op
+ '#maxlength' => 255,
is it 255 or 256? I'll go check.
Powered by Dreditor.
#11
+++ location.module 26 Jun 2010 09:10:28 -0000@@ -603,7 +603,7 @@ function location_locationapi(&$obj, $op
+ '#maxlength' => 255,
is it 255 or 256? I'll go check.
seems like 255. :)
is this the right place to check?
http://drupalcode.org/viewvc/drupal/contributions/modules/location/locat...
lines 401-404
Powered by Dreditor.
#12
Yep right place to check, on lines 48 - 75 for mysql and 401 - 404 for the update
255 for name, street, additional and city. province and postal_code are length 16, may as well apply those too.
On second thought province is autocomplete so perhaps should be left to 64 in case it interferes
And postal_code already is 16
#13
The original commit must have been lost at some point.
Committed to 5, 6 & 7.
http://drupal.org/cvs?commit=387906
http://drupal.org/cvs?commit=387904
http://drupal.org/cvs?commit=387902
#14
Automatically closed -- issue fixed for 2 weeks with no activity.