Question

Photo of Arran France

0

Editing or Adding a Family Address Produces an Exception

Screenshot_4.png

  • Photo of David Leigh

    1

    I'm only guessing here, but have you removed a Defined Value from the Defined Type "Address State" that is used in the address you are trying to update?

    Looks like the error might relate to the fact that the State field holds a value that is not available in the State drop-down list, and I think the list is populated using the Defined Values associated with that Defined Type.

     

    • Arran France

      That probably has something to do with it. I was using Bing Maps as a Location Service as a test which caused the error. I just typed into Bing Maps the address that it should have been and the county (UK state equivalent) came out different to the value we had in the system.
      I've added that value to the defined type but the error persists.

    • David Leigh

      I'm not sure which field(s) Rock tries to match on, but maybe try adding the value that is returned by Bing to both the "Value" and "Description" fields of the Defined Value? Could there be any issues with the Country Code of the Defined Value not matching the Country Code returned by Bing?

    • David Leigh

      So was my original guess correct, that the error was caused by the fact that the existing State field (County in your case) of the address did not exist as a Defined Value? If this is the case, the result should either be a warning message or the field should be left blank - it shouldn't cause this kind of error.

    • Arran France

      Yes. Bing Maps was parsing the address so that "England" was listed as the state. This obviously wasn't a defined value and was causing the exception.

    • David Leigh

      In that case, I think the answer is to log this as a bug. As I said before, I think the system should either warn or ignore the invalid value - but not throw an exception.

  • Photo of Mike Peterson

    0

    I'm having trouble reproducing this. Do you know which version of Rock you were using when this happened? It is possible that it was fixed in https://github.com/SparkDevNetwork/Rock/commit/1166a2854b952becff294e14557066e22363ea8a