# SOLVED: Can't add new products

**URL:** <https://www.dolibarr.org/forum/t/solved-cant-add-new-products/16839>\
**Category:** Using my Dolibarr\
**Created:** [August 18, 2018, 10:16pm UTC](https://www.dolibarr.org/forum/t/solved-cant-add-new-products/16839 "2018-08-18T22:16:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ppaniceres](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/p/f4b2a3/32.png) [@ppaniceres](https://www.dolibarr.org/forum/u/ppaniceres)\
**Post date:** [August 18, 2018, 10:16pm UTC](https://www.dolibarr.org/forum/t/solved-cant-add-new-products/16839/1 "2018-08-18T22:16:53Z")

</div>

Hello all,

I’ve imported about 580 products from an excel sheet, all actions / atributes are ok for these items. I want to add new products (new ones, copying existing ones, etc). This error is showed:

Cannot add or update a child row: a foreign key constraint fails (`brainco3_doli624`.`llx1n_product_price`, CONSTRAINT `fk_product_price_user_author` FOREIGN KEY (`fk_product`) REFERENCES `llx_product_old` (`rowid`))

Please note that before importing these 580 products, i had not tried to add products so I don’t know if this issue was caused because of this importation.

It happened when using 7.0.3 and still the same issue after updated to 8.0.0.

Thank you,  
Pablo

---

<div class="post-metadata">

**Author:** ![aljawaid](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/aljawaid/32/388_2.png) [@aljawaid](https://www.dolibarr.org/forum/u/aljawaid)\
**Post date:** [September 2, 2018, 11:24pm UTC](https://www.dolibarr.org/forum/t/solved-cant-add-new-products/16839/2 "2018-09-02T23:24:14Z")

</div>

Hello, maybe try one of the below options:  
- Run the installer again  
- Try a clean installation (if there is no loss to your business data/existing products)  
- Upgrade to the latest stable version (currently 8.0.1)  
- Check your folder permissions on your server

---

<div class="post-metadata">

**Author:** ![ppaniceres](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/p/f4b2a3/32.png) [@ppaniceres](https://www.dolibarr.org/forum/u/ppaniceres)\
**Post date:** [September 11, 2018, 6:36pm UTC](https://www.dolibarr.org/forum/t/solved-cant-add-new-products/16839/3 "2018-09-11T18:36:01Z")

</div>

Same problem 8.0.1

Cannot add or update a child row: a foreign key constraint fails (`brainco3_doli624`.`llx1n_product_price`, CONSTRAINT `fk_product_price_user_author` FOREIGN KEY (`fk_product`) REFERENCES `llx_product_old` (`rowid`))

---

<div class="post-metadata">

**Author:** ![ppaniceres](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/p/f4b2a3/32.png) [@ppaniceres](https://www.dolibarr.org/forum/u/ppaniceres)\
**Post date:** [October 25, 2018, 1:48am UTC](https://www.dolibarr.org/forum/t/solved-cant-add-new-products/16839/4 "2018-10-25T01:48:06Z")

</div>

My fault, modified BD manually and made a backup of a table (see below), so constraint fails. Solved.

> [@ppaniceres](#):
>
> Hello all,
> 
> I’ve imported about 580 products from an excel sheet, all actions / atributes are ok for these items. I want to add new products (new ones, copying existing ones, etc). This error is showed:
> 
> Cannot add or update a child row: a foreign key constraint fails (`brainco3_doli624`.`llx1n_product_price`, CONSTRAINT `fk_product_price_user_author` FOREIGN KEY (`fk_product`) REFERENCES `llx_product_old` (`rowid`))
> 
> Please note that before importing these 580 products, i had not tried to add products so I don’t know if this issue was caused because of this importation.
> 
> It happened when using 7.0.3 and still the same issue after updated to 8.0.0.
> 
> Thank you,  
> Pablo
