# After upgrade to 7.0, SQL Escaping ERROR with additional\_addresses / Invalid JSON response

**URL:** <https://community.open-emr.org/t/after-upgrade-to-7-0-sql-escaping-error-with-additional-addresses-invalid-json-response/18853>\
**Category:** Support\
**Created:** [July 26, 2022, 2:28pm UTC](https://community.open-emr.org/t/after-upgrade-to-7-0-sql-escaping-error-with-additional-addresses-invalid-json-response/18853 "2022-07-26T14:28:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PeteBoyd](https://community.open-emr.org/user_avatar/community.open-emr.org/peteboyd/32/14391_2.png) [@PeteBoyd](https://community.open-emr.org/u/PeteBoyd)\
**Post date:** [July 26, 2022, 2:28pm UTC](https://community.open-emr.org/t/after-upgrade-to-7-0-sql-escaping-error-with-additional-addresses-invalid-json-response/18853/1 "2022-07-26T14:28:08Z")

</div>

In a test instance of OpenEMR 7.0, upgraded from 6.1, when searching on a patient in the top right search box; or when I subsequently search for a patient in Patient Finder using the “Search:” box in the top right of that page’s dialog and then click on a patient name, I get the following error:

“DataTables warning: table id=pt\_table - Invalid JSON response. For more information about this error, please see [http://datatables.net/tn/1](http://datatables.net/tn/1)”

From the log:  
ERROR: OpenEMR SQL Escaping ERROR of the following string: additional\_addresses, referer: interface/main/finder/dynamic\_finder.php?search\_any=test

If I were instead to seach another way using Patient Finder then I don’t see the error. And I only see it in the above 2 instances; once the error is dispelled, subsequent searches dont elecit the error.

External ID / pubpid is hidden in the demographics form. If I instead make it Optional then I also get this error:  
“undefined  
URL: undefined  
Line: undefined Column: undefined  
Error object: undefined”

I’ve seen this previously with OpenEMR 6.1 when I first hid “External ID” in the demographics form. Back then I learned this: “A forum thread tells me to expect this error message when disabling elements of the demographics form. I’ve instead hidden, not disabled, the element, which is the correct approach and one that’s not supposed to result in this error.” That issue appeared to eventually go away.

I’m aware that at least the “Invalid JSON response” is an issue in the data being sent out to the browser, rather than an actual db issue.

Any ideas please?

---

<div class="post-metadata">

**Author:** ![stephenwaite](https://community.open-emr.org/user_avatar/community.open-emr.org/stephenwaite/32/15754_2.png) [@stephenwaite](https://community.open-emr.org/u/stephenwaite)\
**Post date:** [July 26, 2022, 3:26pm UTC](https://community.open-emr.org/t/after-upgrade-to-7-0-sql-escaping-error-with-additional-addresses-invalid-json-response/18853/2 "2022-07-26T15:26:06Z")

</div>

@psoas fixed this in [Dynamic Finder AJAX Fix (#5629) · openemr/openemr@e854a3d · GitHub](https://github.com/openemr/openemr/commit/e854a3decc8024ac298fad449c3061a0c50e1c6a), will be in 1st patch

---

<div class="post-metadata">

**Author:** ![PeteBoyd](https://community.open-emr.org/user_avatar/community.open-emr.org/peteboyd/32/14391_2.png) [@PeteBoyd](https://community.open-emr.org/u/PeteBoyd)\
**Post date:** [July 26, 2022, 3:37pm UTC](https://community.open-emr.org/t/after-upgrade-to-7-0-sql-escaping-error-with-additional-addresses-invalid-json-response/18853/3 "2022-07-26T15:37:23Z")

</div>

Great, fixed with that patch. Many thanks.
