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.

AttachmentSize
no_maxlength.patch1.73 KB

Comments

#1

Status:needs review» fixed

Applied to DRUPAL-5 branch. Thanks for the patch.

#2

Status:fixed» closed (fixed)

#3

Version:5.x-1.x-dev» 6.x-3.x-dev
Status:closed (fixed)» active

#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

Status:active» needs review

New patch for 6.x-3.x-dev.

AttachmentSize
location-DRUPAL-6--3_no_maxlength.patch 1.67 KB

#6

Status:needs review» reviewed & tested by the community

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

Status:reviewed & tested by the community» needs work

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 ;-)

AttachmentSize
location-DRUPAL-6--3_255_maxlength.patch 1.82 KB

#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

Status:needs work» reviewed & tested by the community

+++ 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

Status:reviewed & tested by the community» fixed

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

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here