CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.1 Release Testing (Moderator: Kurund Jalmi) »
  • Error importing contact data - street_unit field in civicrm_address too small
Pages: [1]

Author Topic: Error importing contact data - street_unit field in civicrm_address too small  (Read 1276 times)

spalmstr

  • I post occasionally
  • **
  • Posts: 44
  • Karma: 2
  • CiviCRM version: 4.5.4
  • CMS version: Joomla! 3.3.6 Stable [ Ember ] 01-October-2014 02:00 GMT
  • MySQL version: 5.6.21
  • PHP version: 5.6.0
Error importing contact data - street_unit field in civicrm_address too small
January 17, 2012, 10:38:39 am
The street_unit field in the table civicrm_address is only VARCHAR(16), whilst the street_name field is VARCHAR(64).  Surely this is inconsistent?  I tried a data import that failed because of this error.



Sorry. A non-recoverable error has occurred.

--------------------------------------------------------------------------------

DB Error: unknown error



 Error Details

Database Error Code: Data too long for column 'street_unit' at row 1, 1406

Additional Details:
Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=> -1
    [message] => DB Error: unknown error
    [mode] => 16
    [debug_info] => UPDATE  civicrm_address  SET contact_id = 1740 , location_type_id = 1 , is_primary = 1 , is_billing = 0 , street_address = '4 rue Pierre et Marie Curie' , street_number = 4 , street_number_suffix = NULL , street_name = 'rue' , street_unit = 'Pierre et Marie Curie' , city = '49480 St Sylvain d’Anjou' , country_id = 1076 , geo_code_1 = 47.5158484 , geo_code_2 = -0.4724194   WHERE (  civicrm_address.id = 1739 )   [nativecode=1406 ** Data too long for column 'street_unit' at row 1]
    [type] => DB_Error
    [user_info] => UPDATE  civicrm_address  SET contact_id = 1740 , location_type_id = 1 , is_primary = 1 , is_billing = 0 , street_address = '4 rue Pierre et Marie Curie' , street_number = 4 , street_number_suffix = NULL , street_name = 'rue' , street_unit = 'Pierre et Marie Curie' , city = '49480 St Sylvain d’Anjou' , country_id = 1076 , geo_code_1 = 47.5158484 , geo_code_2 = -0.4724194   WHERE (  civicrm_address.id = 1739 )   [nativecode=1406 ** Data too long for column 'street_unit' at row 1]
    [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="UPDATE  civicrm_address  SET contact_id = 1740 , location_type_id = 1 , is_primary = 1 , is_billing = 0 , street_address = '4 rue Pierre et Marie Curie' , street_number = 4 , street_number_suffix = NULL , street_name = 'rue' , street_unit = 'Pierre et Marie Curie' , city = '49480 St Sylvain d’Anjou' , country_id = 1076 , geo_code_1 = 47.5158484 , geo_code_2 = -0.4724194   WHERE (  civicrm_address.id = 1739 )   [nativecode=1406 ** Data too long for column 'street_unit' at row 1]"]
)


 

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Error importing contact data - street_unit field in civicrm_address too small
January 17, 2012, 05:07:41 pm

The address parser was designed primarily for US addresses. I dont think it is doing the right thing for french street addresses

street_unit is typically just a few characters (Unit B etc)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.1 Release Testing (Moderator: Kurund Jalmi) »
  • Error importing contact data - street_unit field in civicrm_address too small

This forum was archived on 2017-11-26.