Query Error ERROR: query failed: INSERT INTO `keys` (`name`, `value`) VALUES (?, ?) - Error: Duplicate entry ‘sixa’ for key ‘name’

Do you only have two entries one sixa and then just one sixb.
I’ll see what I can do on the trap. How long are you available to day. I think you’re 6 hours ahead.

Just two entries, one sixa and one sixb.

It’s 6 hours ahead (and raining), available till 0:00, your time 06:00pm

Check your Patient List Columns in Lists

For the sixa I don’t know what i’d trap but this issue is vaguely familiar for an x12 partner bug awhile back. You may want to check issues and the forum for some potential info.

I’ll still look into this but need to do a few other things before I end the day.

Just checked patients list Columns in Lists, it’s the same as in the demo version.

I will check issues about x12 partner.
Note: I will go on tomorrow morning …

I found a simulair issue, however there is no solution shown.
Note: I have sent a message to the submitter …

hi @rickzimm, if you’re able, try reinstalling to confirm wasn’t a fluke, thanks.

I have made a clean install of openemr 6.0.0 on the server (+ new database). Still have to wait till a few apache and php settings are imported (after the server migration done by the provider to a new system, I’m not able to do those myself.)

First, after the provider’s migration, I will check if openemr works as it should be without the same issues as described above.

If it works as it suppose to be, I wil try to import the data from my operational openemr database into the clean database, and see what happens.

If anyone still have suggestions, please feel free …

Hi @sjpadgett and @brady.miller this is maybe something for the openemr developers:
After logging in go to: administration -> forms -> layout, select: demographics
In demographics , after a few minutes the following message was displayed: This page is not responding: openemr (wait or close).

My domain provider figured out that this only happens in the browsers: Edge and Mozilla Firefox.
However, in Chrome it’s working as it is supposed to be.

Still have the following error: Print screen error.pdf (82.6 KB)

Also the the following is still there: ERROR: query failed: INSERT INTO keys (name, value) VALUES (?, ?) Error: Duplicate entry ‘sixa’ for key ‘name’
Appears under the “settings for practice” the “healthinsurance companies and X12-partners”
Note: in menu Administration -> practice, in submenu only practice settings appears, not rules and alerts!

And, after 10 minutes, the following error appears when using patient finder:
DataTables warning: table id=pt_table - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1
And also when selecting other menus items it says: Site ID is missing from session data!

Can you help me out with this?

thx

hi @rickzimm, what customizations if any were made to the demographics layout?

Non, there are no modifications made.

OK, and this is version 6.0.0(2)?

Screenshot from 2021-07-15 07-46-09

also, any modifications to the codebase like this thread?

I’m using vs 6.0.0(2).

First, I made that configuration, however it didn’t worked out as it used to be in forms where extra keywords were added. I have restored the original files.

OK, you’re using edge browser? Have you cleared the cache?

In this case I use Firefox, Edge and Chrome I did clear the cache several times

OK, when you say you’ve checked the core demographics, have you compared the IDs in the Demographics layout


with the Name column in the patient_data table like in this phpmyadmin view?
Screenshot from 2021-07-15 09-37-01

I checked demographics with the demo version.

I will check also as mentioned above.

The following copied from my error log:
[Thu Jul 15 15:27:58.336768 2021] [fcgid:warn] [pid 7409:tid 140668190009088] [client 2a02:a45c:3bef:1:716f:4b2f:4c0c:b845:36538] mod_fcgid: stderr: SQL Error with statement:query failed: INSERT INTO keys (name, value) VALUES (?, ?)–Duplicate entry 'sixa' for key 'name'==>/var/www/vhosts/domeinname.nl/httpdocs/openemr/src/Common/Crypto/CryptoGen.php at 433:sqlStatementNoLog, referer: https://www.domeinname.nl/openemr/controller.php?practice_settings&pharmacy&action=list

Does this make the error a little clearer?

what if you comment out lines 19 and 21 of sites/default/config.php so the cryptogen isn’t called on these 2 array values? does that suppress the error in practice settings?

I did ## lines 19 and 21, the same error still exist …

A temporary workaround would be to replace the INSERT statement by :

  1. If the value of sixa needs to be updated -
INSERT INTO keys (name, value) VALUES (?,?)
  ON DUPLICATE KEY UPDATE value=?
** Will need to provide "value" twice to be replacing additional "?" **
  1. If logic requires current sixa to be retained -
INSERT IGNORE INTO keys (name, value) VALUES (?,?);
1 Like