# Error with adding a list item to LBF List box w/add field

**URL:** <https://community.open-emr.org/t/error-with-adding-a-list-item-to-lbf-list-box-w-add-field/23814>\
**Category:** Support\
**Created:** [November 12, 2024, 6:15pm UTC](https://community.open-emr.org/t/error-with-adding-a-list-item-to-lbf-list-box-w-add-field/23814 "2024-11-12T18:15:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![moussa](https://community.open-emr.org/letter_avatar_proxy/v4/letter/m/90ced4/32.png) [@moussa](https://community.open-emr.org/u/moussa)\
**Post date:** [November 12, 2024, 6:15pm UTC](https://community.open-emr.org/t/error-with-adding-a-list-item-to-lbf-list-box-w-add-field/23814/1 "2024-11-12T18:15:07Z")

</div>

**Situation**  
I am not able to add an item to LBF List box w/add field. Some times I get pop up with Authentication Error. I did check the demo site and they are working fine. My work around is adding the item directly to the list but I was hoping I can find a fix to this

**OpenEMR Version**  
I’m using OpenEMR version 7.0.2 patch 2

**Browser** :  
I’m using: Chrome

**Operating System**  
I’m using: Debian 12

**Search**  
Did you search the forum for similar questions?  
Yes, there was one similar issue in Jul 2019 but no answer provided

**Logs**  
Did you check the logs? Yes  
Was there anything pertinent in them? Yes

```auto
[12/Nov/2024:12:26:09 -0500] "GET /library/ajax/addlistitem.php?csrf_token_form=1111111111111111111&listid=country&newitem=random&newitem_abbr=random HTTP/1.1" 200 725 "https://openemr/interface/patient_file/summary/demographics_full.php" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"

```

```auto
[Tue Nov 12 17:43:47.506274 2024] [php:notice] [pid 146023:tid 146023] SQL Error with statement:query failed: SELECT * FROM list_options WHERE list_id= ? AND option_id = ?AND activity = 1--You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near &#039;?AND activity = 1&#039; at line 1==&gt;/var/www/openemr/library/ajax/addlistitem.php at 52:sqlQuery, referer: https://openemr/interface/patient_file/summary/demographics_full.php
[Tue Nov 12 17:43:55.621254 2024] [php:notice] [pid 146019:tid 146019] [client 107.143.107.236:8137] OpenEMR CSRF token authentication error, referer: https://emr.carepointinfusion.com/interface/patient_file/summary/demographics_full.php

```

You can also turn on User Debugging under Administration-\>Globals-\>Logging User Debugging Options=\>All

---

<div class="post-metadata">

**Author:** ![moussa](https://community.open-emr.org/letter_avatar_proxy/v4/letter/m/90ced4/32.png) [@moussa](https://community.open-emr.org/u/moussa)\
**Post date:** [November 13, 2024, 3:36pm UTC](https://community.open-emr.org/t/error-with-adding-a-list-item-to-lbf-list-box-w-add-field/23814/2 "2024-11-13T15:36:29Z")

</div>

Thanks for the backups.

I rolled back to a previous backup, and everything’s working fine now. 😃
