Answers.Body: <p>If the problem is that the county does not show up with <em>viewing</em> the address on the contact summary page... You can control what address fields are displayed by clicking <code>Adminster -&gt; Localization -&gt; Address Settings.</code></p>
  
  <p>Then, find the <code>Address Display Format</code> field and add to it: <code>{contact.county}</code></p>
  
  <p>If the problem is that when you edit the address, no county field shows up, then you can choose which fields show up by clicking <code>Adminster -&gt; Localization -&gt; Address Settings.</code></p>
  
  <p>Then, find the <code>Address Editing</code> field and check off the county option.</p>
  
  <p>If the problem is that the county option is not even an option for <code>Address Editing</code>, then click <code>Administer -&gt; System Settings -&gt; Option Groups.</code> Find <code>Addressing Options</code> and clicked <code>Edit Option</code>. Hopefully <code>county</code> will be listed but disabled and you can simply enable it. If it's not there at all you could try adding it, but I'm not sure if it will be added in a way the CiviCRM expects.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-11-27T04:23:02.850Z
Answers.Text: Thanks Jamie - forgot about that. But here's the problem - City, County and State don't appear under Address Editing there :( as they should...
Answers.UserDisplayName: Joe McLaughlin
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-09T18:36:10.267Z
Answers.Text: Here's what I have in Address *Display*, and these fields are displayed:
  
  `
  {contact.address_name}
  {contact.street_address}
  {contact.supplemental_address_1}
  {contact.supplemental_address_2}
  {contact.supplemental_address_3}
  {contact.city}{, }{contact.state_province}{ }{contact.postal_code}
  {contact.country}
  `
  
  I don't see City, County , State in Address *Editing*, as I should, is the problem.
Answers.UserDisplayName: Joe McLaughlin
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-10T19:38:29.070Z
Answers.Text: I see - I misunderstood the question. I think I edited the answer to cover it.
Answers.UserDisplayName: Jamie
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-10T21:36:53.123Z
Answers.Text: Thanks so much Jamie! I'm on the road but will try the fix when I get in front of my laptop.
Answers.UserDisplayName: Joe McLaughlin
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-11T00:01:02.553Z
Answers.Text: OK, so some progress. 
  I went to 
  `Administer -> System Settings -> Option Groups -> Addressing Options` 
  and added City, County and State/Province back in. 
  I edited to use the same Values and Order as in the dmaster demo at 
  `https://dmaster.demo.civicrm.org/civicrm/admin/options?reset=1`.
  And I see those now as options in
  `Administer -> Localization -> Address Settings -> Address Editing`.
  I checked the box for those options - City, County and State/Province  - and saved the changes.
Answers.UserDisplayName: Joe McLaughlin
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-11T00:01:13.080Z
Answers.Text: However, I still don't see City, County or State/Province as options when editing a contact's Home Address in the Contact Summary screen.
  I'm thinking I may have to do a database update, and/or `drush cc all`?
Answers.UserDisplayName: Joe McLaughlin
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-12T22:53:25.327Z
Answers.Text: So still trying to fix this. My latest theory is that something got changed in this file on my server when I uninstalled/reinstalled the extension and/or upgraded Civi versions -  https://github.com/civicrm/civicrm-core/tree/master/templates/CRM/Contact/Form/Edit/Address . But when looking at Address.php on my demo site, I can see city, county, state/province in the code where I think they should be. Hmm.
Answers.UserDisplayName: Joe McLaughlin
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-11-26T17:45:24.400Z
Answers.LastActivityDate: 2019-12-10T19:38:06.330Z
Answers.LastEditDate: 2019-12-10T19:38:06.330Z
Answers.UserDisplayName: Jamie
Body: <p>I'm on Civi 5.20.0 and Drupal 7.67.</p>
  
  <p>I installed and re-installed the Electoral extension, see</p>
  
  <p><a href="https://github.com/josephlacey/com.jlacey.electoral/issues/23" rel="nofollow noreferrer">https://github.com/josephlacey/com.jlacey.electoral/issues/23</a> </p>
  
  <p>and</p>
  
  <p><a href="https://github.com/josephlacey/com.jlacey.electoral/issues/25" rel="nofollow noreferrer">https://github.com/josephlacey/com.jlacey.electoral/issues/25</a>. </p>
  
  <p>To reinstall the Electoral extension, I deleted a number of custom fields, and option values, using the API, including City, County and State/Province from Option Group 21, Addressing Options. </p>
  
  <p>I had used the Contact Summary Editor to create a custom layout. I have the Address block/pane on the top left of the leftmost column. Address is a 'predefined block', meaning it's in Core code, right?</p>
  
  <p>But, now I don't see the City, County or State in the contact summary Address when editing, just when displayed. I do see Street Address, Postal Code and Country displayed and when editing. </p>
  
  <p>The core.Address code is still there, I can see all the fields using the API Explorer to GET the Contact Summary layout, and I can update a record's Address values with the API Explorer.  I just don't see the fields in the UI when selecting Edit in the Address pane.</p>
  
  <p>UPDATE: I just upgraded to Civi 5.19.2 and still see the same error.</p>
  
  <p>So my assumption is that I deleted something I should not have during the Electoral extension install and re-install process, like a reference to City, County and State in the Address pane Edit UI, but not sure now what, or how to restore it :) . </p>
  
  <p>UPDATE 2: I was able to duplicate the problem on the dmaster demo site by disabling City, County and State/Province in Addressing Options in Option Groups, which caused those fields to not appear in <code>Administer -&gt; Localization -&gt; Address Settings -&gt; Address Editing</code> and so not in Address editing in the Summary screen for a Contact. And I was able to fix that on the dmaster demo site by re-enabling the fields in Addressing Options and selecting the checkboxes in Address Editing. However, the same fix does not work on my demo site.</p>
  
  <p>UPDATE 3: I had deleted the City, County and State/Province option values in Addressing Options, duh on me, then added them back in, but of course, they had a new auto-incremented ID number. I thought that restoring to the previous, original OptionValue ID would fix the problem with the City, County and State/Province not appearing when editing an Address in the Summary screen. I was able to update the ID using mysql at the command line. But, changing the Option Value ID back didn't do the trick. </p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-11-26T01:43:17.433Z
Comments.Text: can you replicate on dmaster?
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-11-26T11:44:18.077Z
Comments.Text: Yeah I can try but don't want to break that right. See background here that I'll add ^^^.
Comments.UserDisplayName: Joe McLaughlin
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-09T20:05:41.587Z
Comments.Text: Pete BTW I can't replicate this on dmaster without installing, uninstalling and reinstalling the Electoral extension and removing fields with the API per the Issues linked above. But I guess since dmaster is restored easily, I will try that. I do see that the City, County and State fields appear in Address Editing on dmaster, as they should, and not in Address Editing on my demo site.
Comments.UserDisplayName: Joe McLaughlin
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-09T20:13:21.197Z
Comments.Text: aha and since the Electoral extension is not listed under Add New at  https://dmaster.demo.civicrm.org/civicrm/admin/extensions?reset=1 , I can't do that anyway.
Comments.UserDisplayName: Joe McLaughlin
Tags: <contacts><addresses><contact-view><contact-summary-editor>
Title: How do I restore City, County, State to the Address block in Contact Summary
ThreadText: # How do I restore City, County, State to the Address block in Contact Summary
  
  (Asked by: username_0 on 2019-11-25)
  
  I'm on Civi 5.20.0 and Drupal 7.67.
  
  I installed and re-installed the Electoral extension, see
  
  <https://github.com/josephlacey/com.jlacey.electoral/issues/23>
  
  and
  
  <https://github.com/josephlacey/com.jlacey.electoral/issues/25>.
  
  To reinstall the Electoral extension, I deleted a number of custom fields, and option values, using the API, including City, County and State/Province from Option Group 21, Addressing Options.
  
  I had used the Contact Summary Editor to create a custom layout. I have the Address block/pane on the top left of the leftmost column. Address is a 'predefined block', meaning it's in Core code, right?
  
  But, now I don't see the City, County or State in the contact summary Address when editing, just when displayed. I do see Street Address, Postal Code and Country displayed and when editing.
  
  The core.Address code is still there, I can see all the fields using the API Explorer to GET the Contact Summary layout, and I can update a record's Address values with the API Explorer. I just don't see the fields in the UI when selecting Edit in the Address pane.
  
  UPDATE: I just upgraded to Civi 5.19.2 and still see the same error.
  
  So my assumption is that I deleted something I should not have during the Electoral extension install and re-install process, like a reference to City, County and State in the Address pane Edit UI, but not sure now what, or how to restore it :) .
  
  UPDATE 2: I was able to duplicate the problem on the dmaster demo site by disabling City, County and State/Province in Addressing Options in Option Groups, which caused those fields to not appear in `Administer -> Localization -> Address Settings -> Address Editing` and so not in Address editing in the Summary screen for a Contact. And I was able to fix that on the dmaster demo site by re-enabling the fields in Addressing Options and selecting the checkboxes in Address Editing. However, the same fix does not work on my demo site.
  
  UPDATE 3: I had deleted the City, County and State/Province option values in Addressing Options, duh on me, then added them back in, but of course, they had a new auto-incremented ID number. I thought that restoring to the previous, original OptionValue ID would fix the problem with the City, County and State/Province not appearing when editing an Address in the Summary screen. I was able to update the ID using mysql at the command line. But, changing the Option Value ID back didn't do the trick.
  
  **Tags:** contacts, addresses, contact-view, contact-summary-editor
  
  > **Comments:**
  > **username_1**: can you replicate on dmaster?  
  > **username_0**: Yeah I can try but don't want to break that right. See background here that I'll add ^^^.  
  > **username_0**: Pete BTW I can't replicate this on dmaster without installing, uninstalling and reinstalling the Electoral extension and removing fields with the API per the Issues linked above. But I guess since dmaster is restored easily, I will try that. I do see that the City, County and State fields appear in Address Editing on dmaster, as they should, and not in Address Editing on my demo site.  
  > **username_0**: aha and since the Electoral extension is not listed under Add New at  https://dmaster.demo.civicrm.org/civicrm/admin/extensions?reset=1 , I can't do that anyway.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2019-11-26. Score: 1
  
  If the problem is that the county does not show up with *viewing* the address on the contact summary page... You can control what address fields are displayed by clicking `Adminster -> Localization -> Address Settings.`
  
  Then, find the `Address Display Format` field and add to it: `{contact.county}`
  
  If the problem is that when you edit the address, no county field shows up, then you can choose which fields show up by clicking `Adminster -> Localization -> Address Settings.`
  
  Then, find the `Address Editing` field and check off the county option.
  
  If the problem is that the county option is not even an option for `Address Editing`, then click `Administer -> System Settings -> Option Groups.` Find `Addressing Options` and clicked `Edit Option`. Hopefully `county` will be listed but disabled and you can simply enable it. If it's not there at all you could try adding it, but I'm not sure if it will be added in a way the CiviCRM expects.
  
  > **Comments:**
  > **username_0**: Thanks username_2 - forgot about that. But here's the problem - City, County and State don't appear under Address Editing there :( as they should...  
  > **username_0**: Here's what I have in Address *Display*, and these fields are displayed:  ` {contact.address_name} {contact.street_address} {contact.supplemental_address_1} {contact.supplemental_address_2} {contact.supplemental_address_3} {contact.city}{, }{contact.state_province}{ }{contact.postal_code} {contact.country} `  I don't see City, County , State in Address *Editing*, as I should, is the problem.  
  > **username_2**: I see - I misunderstood the question. I think I edited the answer to cover it.  
  > **username_0**: Thanks so much username_2! I'm on the road but will try the fix when I get in front of my laptop.  
  > **username_0**: OK, so some progress.  I went to  `Administer -> System Settings -> Option Groups -> Addressing Options`  and added City, County and State/Province back in.  I edited to use the same Values and Order as in the dmaster demo at  `https://dmaster.demo.civicrm.org/civicrm/admin/options?reset=1`. And I see those now as options in `Administer -> Localization -> Address Settings -> Address Editing`. I checked the box for those options - City, County and State/Province  - and saved the changes.  
  > **username_0**: However, I still don't see City, County or State/Province as options when editing a contact's Home Address in the Contact Summary screen. I'm thinking I may have to do a database update, and/or `drush cc all`?  
  > **username_0**: So still trying to fix this. My latest theory is that something got changed in this file on my server when I uninstalled/reinstalled the extension and/or upgraded Civi versions -  https://github.com/civicrm/civicrm-core/tree/master/templates/CRM/Contact/Form/Edit/Address . But when looking at Address.php on my demo site, I can see city, county, state/province in the code where I think they should be. Hmm.  
  
  ---
  
  