error regarding public user on upgrade from 12.6-Aveto-enterprise to 13.4-Levanto-platinum

dh

Well-known member
Using "new" upgrade procedure, I receive the following message.

The DBMS server said: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'username_public_user' for key 'dadabik_univlist_config.PRIMARY'

Relatedly, following the upgrade attempt, the public user mode does not appear to be working: at index.php I get the login dialogue instead of the main table. And in admin mode the users tab shows

The DBMS server said: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'username_public_user' for key 'dadabik_univlist_config.PRIMARY'

However, the public_user does still exist in the users table.

Could the upgrade have messed up the public user? How do I unmess it up?


Your current DaDaBIK version​

You are using DaDaBIK version 12.6-Aveto enterprise, installed on 01-19-2026 (installation code: 0), the latest version of DaDaBIK is 13.4-Levanto released on 03-18-2026

You are not running the last release of DaDaBIK, the release you are running might have bugs and security holes, see the official change log for further information. You can upgrade DaDaBIK here.

In case you want to upgrade to a more powerful edition (from Pro to Enterprise/Platinum, from Enterprise to Platinum) please contact us.

System info​

PHP Version: 8.4.18

mysql version: 8.0.45

Web server: Apache

Client: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3.1 Safari/605.1.15

URL installation: https://tbed.org/univlist/
 

dh

Well-known member
Two additional pieces of information:

(1) on the initial upgrade attempt, I thought I needed to put my new license key into config_custom.php, but that produced an error. So I then reverted to the old license key and tried again. That's when these errors occurred.

(2) the initial failure message (a javascript box) was lengthier than the 1062 error shown above, but I did not copy it so I cannot share it. When I try to run up.php again I get only the shorter 1062 error.
 

eugenio

Administrator
Staff member
Hi,
you must revert your application back to its original state with a full db+files backup, try again the upgrade and share the error, if any.
Even better, you can try the upgrade on a copy (restored from the backup) of the application.

Best,
 

dh

Well-known member
@eugenio, I did a complete restore and here's the error that appears after accepting the terms on up2.php:

[08] Error: during query execution. INSERT INTO `dadabik_univlist_config` (name_config, value_config) VALUES ('username_public_user', ''), ('hide_menu_public_user', '0'), ('hide_top_bar_public_user', '0'), ('hide_advanced_features_public_user', '0')
The DBMS server said: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'username_public_user' for key 'dadabik_univlist_config.PRIMARY'
Does this help?
 

eugenio

Administrator
Staff member
Hello,
did you set $use_db_name_beta = 1 in your config_custom file?

If not, could you please try, just after restoring and before upgrading, to check if in dadabik_univlist_config you already have username_public_user?

Best,
 

dh

Well-known member
did you set $use_db_name_beta = 1 in your config_custom file?
No.

If not, could you please try, just after restoring and before upgrading, to check if in dadabik_univlist_config you already have username_public_user?
Yes, username_public_user is already in the table in the restored/pre-upgrade state.

What is the significance of this finding? What next? Thanks!
 

eugenio

Administrator
Staff member
It means you are not running v12.6, username_public_user has been introduced in v12.7.
Are you sure you used a complete (files+db) backup to restore?
 

dh

Well-known member
Yes, I did a WHM restore of the entire user name. I think my registration ran out before 12.7 was introduced, so I don't think I could have downloaded it. I renewed my license only in the 13 series.
 

dh

Well-known member
oh, wait I may be misremembering that. OK< so let's assume I have somehow corrupted my installation. What next?
 

eugenio

Administrator
Staff member
If you never upgraded your 12.6 before, I think what happened is that you upgraded to 13.4 and then restored to 12.6 using a partial backup.

You need to restore v12.6 using a full backup.
 

dh

Well-known member
I have no ability to restore other than a WHM cpanel account restore, and in WHM I chose a backup date the day before I had tried the upgrade. There's basically no other restore I can do that would be any better. So is my only option now a clean install?

And is there any insight into why this happened in the first place? This instance is pretty easy for me to clean install, but I have others that would be a nightmare, and I don't want to run into the same error. Should I use the "old" upgrade method on those?
 

eugenio

Administrator
Staff member
I don't know why that backup contained username_public_user but since it was introduced with v12.7, I assume your backup was not correct or the restore did not correctly run.

If you open an email ticket I can give a closer look to the db.

Best,
 

dh

Well-known member
OK, i have sent an email to support@dadabik.com with the serial number from my Platinum purchase. Thank you.

I'm guessing I simply miscalculated the date on which I needed to restore, and now since I maintain only 5 daily WHM backups, it's gone.
 

deep64blue

DaDaBIK Guru
And is there any insight into why this happened in the first place? This instance is pretty easy for me to clean install, but I have others that would be a nightmare, and I don't want to run into the same error.

.....

I'm guessing I simply miscalculated the date on which I needed to restore, and now since I maintain only 5 daily WHM backups, it's gone.
I strongly suggest you revisit your backup regime if you want to avoid a nightmare in future!

At the very least you should take a manual backup of the site and database each time you upgrade.
 
  • Like
Reactions: dh
Top