I have version 3.6.1 running and I am pretty sure I have not touched anything in the backend since the install. However now when i try and enter a new product, I get an error in the top corner saying… " ErrorFailedToGetInsertedId ".
Without updating to a new version, does anybody know what the error may be?
I added an entry manually into the products table and noticed the new rowid was NULL. The new product also didn’t show within the dolibarr GUI.
The table seemed to have lost the auto-increment function on the rowid when i looked a little closer so i applied the setting and all seemed to work.
Much appreciated guys
I may have created a new problem - once again, I don’t know how all this changed as no one has been in the back end.
I can add the products in via the GUI now but when I go to add the supplier price, I get the following error:
Cannot add or update a child row: a foreign key constraint fails (dbname_dollibar.llx_product_fournisseur_price, CONSTRAINT fk_product_fournisseur_price_fk_product FOREIGN KEY (fk_product) REFERENCES llx_product_2 (rowid))
Are you able to provide any assistance on this one - I’m not too familiar with database language.
i’ve had a similar problem last week…
it was caused by a problem with database backup and restore during a migration.
the restore script failed after the creation of the tables and the insertions and though the keys were not created neither the auto-increments.
i solved this by doing the migation again in a more strict way (not with phpmyadmin).
@eldy: i dont remember exactly but there was a “CREATE ALGORITHM” stuff in the backup script before the creation of the keys and foreign constraints ! i did not investigate further but it’s not the first time i see it and do not know where it comes from.
phpMyAdmin must NEVER be used to make database backup. In most cases ,you won’t be able to restore your backup and a backup you can’t restore is not a backup. The only reliable method is “mysqldump” (the tool used when using first option into dolibarr backup wizard)