Answers.Body: <p>Since you talk about /user/register (which is not a drupal webform but a core drupal form) then this should be a Civi Profile and that is where you would edit the Location Type.</p>
  
  <p>Your screenshot shows you have a Profile called "Name and Home Address" - </p>
  
  <p>have a look for 'edit' on one of the fields in the Profile eg 'Street' and there you should be able to specify the location type of 'street'</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-02T05:16:58.717Z
Answers.Text: This has to be the right spot. And yes, when I click Edit with each field, I can see where to edit the Location Type. But all of the address fields are set to location type Home. The phone is set to Primary. I thought maybe that is the one that was triggering the error so I changed it to home. But it still throws the error. Any other ideas?
Answers.UserDisplayName: Iowa Boy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-02T05:18:38.660Z
Answers.Text: We did just import and convert our database from WordPress. is it possible that something did not convert correctly? If so, where would I look? I have compared "Name and Address" and all the fields to the WordPress site, everything seems to be the same.
Answers.UserDisplayName: Iowa Boy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-02T06:35:32.083Z
Answers.Text: Your error is talking about a dedupe rule isn't it? CRM_Dedupe_BAO_Rule - not sure why that might be related but also it is only a NOTICE not a Warning or an Error.
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-02T06:36:47.530Z
Answers.Text: you could take a look in uf_field for those fields on the Profile (uf_group) ID in case anything leaps out as odd but don't see why a migrate would cause this issue - maybe the 'notice' was always happening? have you checked your error log for other errors?
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-02T06:38:19.063Z
Answers.Text: ie confirm the location_type_id for the fields all make sense there
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-02T20:40:37.060Z
Answers.Text: Good Point, yes, I am getting the same message in my debug log on our WordPress version.
Answers.UserDisplayName: Iowa Boy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-02T20:42:50.343Z
Answers.Text: Yes, I had already looked at the uf_field and uf_group. But I looked again now. I do not see anything there that looks odd.  I also looked at the CRM_Dedupe_BAO_Rule Line 96. But nothing  seems odd there either.
Answers.UserDisplayName: Iowa Boy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-04T13:35:23.260Z
Answers.Text: In the Name and Home Address Civi Profile:
  
  I disabled all the fields, created a user and I did not get the warning message
  I enabled the Street Address field, created a user and the warning message was there
  I disabled the Street Address and enabled all the others, created a user and had no warning message
  I looked at the civicrm_uf_field table and everything looked the same for Street Address as the others. I changed Street Address to Supplemental Address and created a new field for Street Address with location type of Home. Created a user I still got the warning message.
Answers.UserDisplayName: Iowa Boy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-04T13:35:38.990Z
Answers.Text: Continued from above comment:  I again compared this new entry in civicrm_uf_field and everything looked right. Just to test again, I disabled the Street Address field and again created a user and I did not get the warning message.
Answers.UserDisplayName: Iowa Boy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-04T13:38:10.080Z
Answers.Text: When creating a Field within a Profile, what table(s) make up the dropdown list where you select Address name, Addressee, Street Address, City, etc?  Maybe there is something there that makes Street Address different???
Answers.UserDisplayName: Iowa Boy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-04T20:05:45.843Z
Answers.Text: well sleuthed - but have nothing to offer as to why Street Address field is misbehaving esp if i assume this is the Core field and not something you or others whipped up for some reason
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-04T20:09:58.443Z
Answers.Text: fyi - since we seem to agree this is just civicrm profiles you should be able to compare this with one of the demo sites.
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-02T04:37:53.997Z
Answers.LastActivityDate: 2018-05-02T04:37:53.997Z
Answers.UserDisplayName: petednz - fuzion
Body: <p>Drupal 7.59
  Civi 4.7.27
  Webform 4.17
  Webform CiviCRM Integration 4.20</p>
  
  <p>We are in the process of switching over from WordPress to Drupal for our CMS.</p>
  
  <p>With the /user/register, when you click Create Account it does create a Drupal User and a Civi  Contact. However you get the following error message.</p>
  
  <p>Notice: Undefined index: location_type_id in CRM_Dedupe_BAO_Rule->sql() (line 96 of */sites/all/modules/civicrm/CRM/Dedupe/BAO/Rule.php).</p>
  
  <p>Where do I edit this form to change the location type (I am assuming it is the address that is mislabled)?<a href="https://i.sstatic.net/mEBUu.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/mEBUu.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.sstatic.net/GJnKl.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/GJnKl.png" alt="enter image description here"></a></p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-05-01T08:22:15.383Z
Comments.Text: Can you clarify please - you talke about /user/register (which is not a drupal webform but a core drupal form) but you also talk about webform_civicrm. If you really mean user/register then this should be a Civi Profile and that is where you would edit the Location Type
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-05-01T22:19:49.640Z
Comments.Text: This form is the User Login block. But it does have a Civi component to it. I assumed the Civi part was added with the CiviCRM Webform Integration. But maybe that is not the case. When I click configure on the block, that does not give me any edit options for the CiviProfile. I looked in Profiles and I did not see anything there that seemed connected to this block. I added some screenshots to my original question, hopefully this helps clarify what I am looking at.
Comments.UserDisplayName: Iowa Boy
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-05-01T23:24:53.777Z
Comments.Text: I expect you have a Profile called "Name and Home Address" - if not someone has done something complicated instead of 'going with the flow' is my best guess
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-02T03:29:10.133Z
Comments.Text: You are correct. It is the Profile "Name and Home Address" But I do not see anything there to edit that would assign the Location Type. Any ideas what I need to do to make this error message go away?
Comments.UserDisplayName: Iowa Boy
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-02T04:35:26.307Z
Comments.Text: have a look by 'edit' on eg 'Street' and there you should be able to specify the location type of 'street'
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-02T04:38:23.397Z
Comments.Text: converted comments to an Answer - hopefully you will give it a Tick and/or +1 so SE knows this has been answered
Comments.UserDisplayName: petednz - fuzion
Tags: <profile><user-account>
Title: Create User Account profile creates error Undefined index: location_type_id in CRM_Dedupe_BAO_Rule
ThreadText: # Create User Account profile creates error Undefined index: location_type_id in CRM_Dedupe_BAO_Rule
  
  (Asked by: username_0 on 2018-05-01)
  
  Drupal 7.59
  Civi 4.7.27
  Webform 4.17
  Webform CiviCRM Integration 4.20
  
  We are in the process of switching over from WordPress to Drupal for our CMS.
  
  With the /user/register, when you click Create Account it does create a Drupal User and a Civi Contact. However you get the following error message.
  
  Notice: Undefined index: location\_type\_id in CRM\_Dedupe\_BAO\_Rule->sql() (line 96 of \*/sites/all/modules/civicrm/CRM/Dedupe/BAO/Rule.php).
  
  Where do I edit this form to change the location type (I am assuming it is the address that is mislabled)?[![enter image description here](https://i.sstatic.net/mEBUu.png)](https://i.sstatic.net/mEBUu.png)
  
  [![enter image description here](https://i.sstatic.net/GJnKl.png)](https://i.sstatic.net/GJnKl.png)
  
  **Tags:** profile, user-account
  
  > **Comments:**
  > **username_1**: Can you clarify please - you talke about /user/register (which is not a drupal webform but a core drupal form) but you also talk about webform_civicrm. If you really mean user/register then this should be a Civi Profile and that is where you would edit the Location Type  
  > **username_0**: This form is the User Login block. But it does have a Civi component to it. I assumed the Civi part was added with the CiviCRM Webform Integration. But maybe that is not the case. When I click configure on the block, that does not give me any edit options for the CiviProfile. I looked in Profiles and I did not see anything there that seemed connected to this block. I added some screenshots to my original question, hopefully this helps clarify what I am looking at.  
  > **username_1**: I expect you have a Profile called "Name and Home Address" - if not someone has done something complicated instead of 'going with the flow' is my best guess  
  > **username_0**: You are correct. It is the Profile "Name and Home Address" But I do not see anything there to edit that would assign the Location Type. Any ideas what I need to do to make this error message go away?  
  > **username_1**: have a look by 'edit' on eg 'Street' and there you should be able to specify the location type of 'street'  
  > **username_1**: converted comments to an Answer - hopefully you will give it a Tick and/or +1 so SE knows this has been answered  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-05-02. Score: 1
  
  Since you talk about /user/register (which is not a drupal webform but a core drupal form) then this should be a Civi Profile and that is where you would edit the Location Type.
  
  Your screenshot shows you have a Profile called "Name and Home Address" -
  
  have a look for 'edit' on one of the fields in the Profile eg 'Street' and there you should be able to specify the location type of 'street'
  
  > **Comments:**
  > **username_0**: This has to be the right spot. And yes, when I click Edit with each field, I can see where to edit the Location Type. But all of the address fields are set to location type Home. The phone is set to Primary. I thought maybe that is the one that was triggering the error so I changed it to home. But it still throws the error. Any other ideas?  
  > **username_0**: We did just import and convert our database from WordPress. is it possible that something did not convert correctly? If so, where would I look? I have compared "Name and Address" and all the fields to the WordPress site, everything seems to be the same.  
  > **username_1**: Your error is talking about a dedupe rule isn't it? CRM_Dedupe_BAO_Rule - not sure why that might be related but also it is only a NOTICE not a Warning or an Error.  
  > **username_1**: you could take a look in uf_field for those fields on the Profile (uf_group) ID in case anything leaps out as odd but don't see why a migrate would cause this issue - maybe the 'notice' was always happening? have you checked your error log for other errors?  
  > **username_1**: ie confirm the location_type_id for the fields all make sense there  
  > **username_0**: Good Point, yes, I am getting the same message in my debug log on our WordPress version.  
  > **username_0**: Yes, I had already looked at the uf_field and uf_group. But I looked again now. I do not see anything there that looks odd.  I also looked at the CRM_Dedupe_BAO_Rule Line 96. But nothing  seems odd there either.  
  > **username_0**: In the Name and Home Address Civi Profile:  I disabled all the fields, created a user and I did not get the warning message I enabled the Street Address field, created a user and the warning message was there I disabled the Street Address and enabled all the others, created a user and had no warning message I looked at the civicrm_uf_field table and everything looked the same for Street Address as the others. I changed Street Address to Supplemental Address and created a new field for Street Address with location type of Home. Created a user I still got the warning message.  
  > **username_0**: Continued from above comment:  I again compared this new entry in civicrm_uf_field and everything looked right. Just to test again, I disabled the Street Address field and again created a user and I did not get the warning message.  
  > **username_0**: When creating a Field within a Profile, what table(s) make up the dropdown list where you select Address name, Addressee, Street Address, City, etc?  Maybe there is something there that makes Street Address different???  
  > **username_1**: well sleuthed - but have nothing to offer as to why Street Address field is misbehaving esp if i assume this is the Core field and not something you or others whipped up for some reason  
  > **username_1**: fyi - since we seem to agree this is just civicrm profiles you should be able to compare this with one of the demo sites.  
  
  ---
  
  