Can't delete patient

Situation
I recently upgraded to v 6.1 latest patch. now i am trying delete a patient and getting this error

OpenEMR Version
I’m using OpenEMR version 6.1.0 (1)

Browser:
I’m using: Google Chrome Version 102.0.5005.63 (Official Build) (64-bit)

Operating System
I’m using: Win 10 Pro

Logs
Did you check the logs?

PHP error logs:
(((PHP Warning: Undefined array key 1 in \xampp\htdocs\openemr\src\Menu\MenuRole.php on line 244, referer: XXXX/openemr/interface/login/login.php?site=default)))

MenuRole.php on line 244:
((( if (AclMain::aclCheckCore($arr[0], $arr[1])) {)))

you can change openemr/delete.html.twig at rel-610 · openemr/openemr · GitHub to

        href="../../../interface/patient_file/deleter.php?patient={{ pid|attr_url }}&csrf_token_form={{ csrf|attr_url }}"
1 Like

Excellent, working fine now. Do i have to keep track of this for future updates or this is some kind of bug ?

This error is present even in the official Demo for version 6.1.0. When I correct the delete.html.twig file as described above, I get a confirmation page, that was not present before, but after confirmation I get this error:
“There was an OpenEMR SQL Escaping ERROR of the following string patient_history”

I only deleted one patient and it worked with no errors. I will create a demo patient and delete again and report back again

a better fix is in master now and will bring back for the next patch

the sql escaping is a separate issue and needs more investigation into your db as to what exactly failed in the patient_history table

1 Like

@sergiors i tried both fixes and both are working.

the official demos are tied to the tagged version of openemr v6.1.0 patch 1 which doesn’t have the most recent commits to v6.1.0 like these demos