cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.3 - After moving theme files to root folder getting error - SQLSTATE[23000]

Highlighted

Magento 2.3 - After moving theme files to root folder getting error - SQLSTATE[23000]

After move theme folder (app, pub, lib) to root folder then run php bin/magento setup:upgrade getting the following error,

 

> php bin/magento setup:upgrade

 

Installing data... SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '21' for key 'PRIMARY', query was: INSERT INTO `eav_attribute_set` (`entity_type_id`, `attribute_set_name`, `sort_order`, `attribute_set_id`) VALUES (?, ?, ?, ?)

5 REPLIES 5
Highlighted

Re: Magento 2.3 - After moving theme files to root folder getting error - SQLSTATE[23000]

Hi @Aveeva 

Kindly refer below url:
https://magento.stackexchange.com/questions/216720/sqlstate23000-integrity-constraint-violation-1062...

Follow steps mentioned within solution, it will help you to resolve issue.

If issue resolve, please click on 'Kudos' & Accept as Solution!

Highlighted

Re: Magento 2.3 - After moving theme files to root folder getting error - SQLSTATE[23000]

@Bhanu Periwal  Here Duplicate entry 21 is my attribute_set_id Now what i need to do?

Highlighted

Re: Magento 2.3 - After moving theme files to root folder getting error - SQLSTATE[23000]

Hello @Aveeva 

Please take backup of table or complete database first.

Edit that row, you will see there is more than 1 entry (comma separated) for same value (here 21), just remove all other duplicates values from there and save it.

Flush cache and re-run index command.

If error comes again then again (that may come for other products as well) check and fix in similar way.

If issue resolve, Please click on 'Kudos' & Accept as Solution!

Highlighted

Re: Magento 2.3 - After moving theme files to root folder getting error - SQLSTATE[23000]

@Bhanu Periwal  From your point, "Edit that row, you will see there is more than 1 entry (comma separated) for same value (here 21), just remove all other duplicates values from there and save it."

Here 21 is available single time,

 

Screenshot :  https://snipboard.io/v1z0f2.jpg

 

 

What i need to do?

Highlighted

Re: Magento 2.3 - After moving theme files to root folder getting error - SQLSTATE[23000]

@Bhanu Periwal Final stage error, could you pls help me. Thanks.