Error in Layout Editor

Situation
When in the Layout Editor and using “With selected: Move to or copy to Layout” get this popup error.
DataTables warning: table id=my_data_table - Invalid JSON response. For more information about this error, please see 1. Warning: Invalid JSON response

OpenEMR Version
7.0.3 patch 4

Browser:
I’m using: Brave

Operating System
I’m using: Ubuntu Server 24.0.3

Search
Did you search the forum for similar questions? Yes, but not much. other people have experienced the problem without solution. I’ve tried logging out and back in as one other thread suggested, no dice. I’ve tried microsoft edge, also no dice.

Logs
From my apache2 error.log
PHP Warning: Undefined variable $sellist in /storage/openemr/interface/patient_file/encounter/find_code_dynamic_ajax.php on line 254, referer: {webroot}/interface/patient_file/encounter/find_code_dynamic.php?what=groups&layout_id=DEM

From the openEMR Logs Viewer

|2025-11-24 5:17:24 pm|http-request-Query|http-request-select|CIT-admin-55||Default||1||/interface/patient_file/encounter/find_code_dynamic_ajax.php?csrf_token_form=89c82ca48dfa60a78f1d3fc258fe8df945f339c8&sEcho=1&iColumns=3&sColumns=%2C%2C&iDisplayStart=0&iDisplayLength=50&mDataProp_0=0&sSearch_0=&bRegex_0=false&bSearchable_0=true&bSortable_0=true&mDataProp_1=1&sSearch_1=&bRegex_1=false&bSearchable_1=true&bSortable_1=true&mDataProp_2=2&sSearch_2=&bRegex_2=false&bSearchable_2=true&bSortable_2=true&sSearch=&bRegex=false&iSortCol_0=0&sSortDir_0=asc&iSortingCols=1&what=groups&layout_id=DEM&_=1764026245206|
|---|---|---|---|---|---|---|---|---|---|
|2025-11-24 5:17:24 pm|http-request-Query|http-request-select|CIT-admin-55||Default||1||/interface/patient_file/encounter/find_code_dynamic.php?what=groups&layout_id=DEM|

Looking at the network tab in the dev console, the failed ajax event gave this response:

<br/>
<b>Warning</b>
:  Undefined variable $sellist in <b>/storage/openemr/interface/patient_file/encounter/find_code_dynamic_ajax.php</b>
on line <b>254</b>
<br/>{"sEcho":1,"iTotalRecords":10,"iTotalHasMoreRecords":false,"iSearchEmptyError":false,"iTotalDisplayRecords":10,"aaData":[{"DT_RowId":"CID|{\"code\":\"1\",\"description\":\"Client Information\"}","0":"1","1":"Client Information","2":""},{"DT_RowId":"CID|{\"code\":\"2\",\"description\":\"Emergency Contact\"}","0":"2","1":"Emergency Contact","2":""},{"DT_RowId":"CID|{\"code\":\"3\",\"description\":\"Employment Information\"}","0":"3","1":"Employment Information","2":""},{"DT_RowId":"CID|{\"code\":\"4\",\"description\":\"School Information\"}","0":"4","1":"School Information","2":""},{"DT_RowId":"CID|{\"code\":\"5\",\"description\":\"Relationship Information\"}","0":"5","1":"Relationship Information","2":""},{"DT_RowId":"CID|{\"code\":\"6\",\"description\":\"Medical Information\"}","0":"6","1":"Medical Information","2":""},{"DT_RowId":"CID|{\"code\":\"7\",\"description\":\"Substance Use Information\"}","0":"7","1":"Substance Use Information","2":""},{"DT_RowId":"CID|{\"code\":\"8\",\"description\":\"Treatment Needs\"}","0":"8","1":"Treatment Needs","2":""},{"DT_RowId":"CID|{\"code\":\"9\",\"description\":\"Symptom Questionnaire\"}","0":"9","1":"Symptom Questionnaire","2":""},{"DT_RowId":"CID|{\"code\":\"A\",\"description\":\"Certification\"}","0":"A","1":"Certification","2":""}]}

It looks like the first chunk is just text, obviously not valid JSON. But the following array is valid (checked on jsonlint.com)

Any ideas? Any help?