0

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.

4
  • can you replicate on dmaster?
    – petednz - fuzion
    Nov 26, 2019 at 1:43
  • Yeah I can try but don't want to break that right. See background here that I'll add ^^^. Nov 26, 2019 at 11:44
  • 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. Dec 9, 2019 at 20:05
  • aha and since the Electoral extension is not listed under Add New at dmaster.demo.civicrm.org/civicrm/admin/extensions?reset=1 , I can't do that anyway. Dec 9, 2019 at 20:13

1 Answer 1

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.

7
  • Thanks Jamie - forgot about that. But here's the problem - City, County and State don't appear under Address Editing there :( as they should... Nov 27, 2019 at 4:23
  • 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. Dec 9, 2019 at 18:36
  • I see - I misunderstood the question. I think I edited the answer to cover it.
    – Jamie
    Dec 10, 2019 at 19:38
  • Thanks so much Jamie! I'm on the road but will try the fix when I get in front of my laptop. Dec 10, 2019 at 21:36
  • 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. Dec 11, 2019 at 0:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.