Can't add new patient: "URL was not found on this server" / "CSRF token authentication error"

I have 2 instances running OpenEMR 6.0.0 Patch 4, a live server “A” and a recent backup “B” of this live server.

When I try to create a new patient on A or B I get:
“The requested URL was not found on this server.”

A’s Apache log contains numerous “OpenEMR CSRF token authentication error” where as B’s log does not have any obvious error.

I see this same issue for multiple users.

Another very similarly set up live server with OpenEMR 6.0.0 Patch 4 “C” does not have this issue.

interface/new/*.php permissions appear to be OK.

I have tried rebooting the server.

Other than upgrading 6.0.0 Patch 3 to Patch 4 a week ago, nothing has knowingly changed recently.

Browser console says:
GET …interface/new/new_search_popup.php&close
Status
404
Not Found
VersionHTTP/1.1
Transferred492 B (275 B size)
Referrer Policystrict-origin-when-cross-origin

I can successfully open interface/new/new_search_popup.php directly in the web browser

I have seen Jerry P say this in regard to the “URL was not found” error: “Also browser console. I’ve seen this if certain changes have been made in demographic’s LBF.” While there are demographics LBF changes, they’re the same across servers A and C and haven’t changed in a long time.

Any thoughts as to what’s going on please?
Thanks

hi @PeteBoyd, sounds familiar, like this issue

Thanks @stephenwaite

When I do this:
SELECT * FROM layout_options WHERE form_id = ‘DEM’ AND uor > 0 AND field_id != ‘’ AND (edit_options LIKE ‘%D%’ OR edit_options LIKE ‘%W%’ ) ORDER BY group_id, seq;

I see this:
form_id: DEM
field_id: patient_groups
group_id: 6
title: Patient Categories
seq: 235
data_type: 36
uor: 1
fld_length: 0
max_length: 0
list_id: Patient_Groupings
titlecols: 1
datacols: 1
default_value
edit_options: [“EP”,“DAP”]
description: Add patient to one or more category.
fld_rows: 0
list_backup_id
source: F
conditions
validation

Does it look like I’m also missing records as in that example?

1 Like

Yeah I see my working instance has the missing records.

1 Like

Most of the edit_options in layout_options had gotten lost. Restoring them fixed this. How does that happen? Is it a fall-out from some lingering issue from having at some point edited demographics LBF?

Hi @PeteBoyd , it sounds like a bug in the latest patch.

Edit: although have also heard a report of this for patch 2 and patch 3 so it’s prob a bug in the editor for the layout based forms.

1 Like

I just restored backup with no issue with edit options. Need to keep an eye out for this though.

1 Like