Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catalog category save fails because of store_id constraint #1448

Closed
vernard opened this issue Jul 7, 2015 · 1 comment
Closed

Catalog category save fails because of store_id constraint #1448

vernard opened this issue Jul 7, 2015 · 1 comment

Comments

@vernard
Copy link
Contributor

vernard commented Jul 7, 2015

Version
0.74.0-beta16

Steps to reproduce

  • Go to Products->Categories in the backend.
  • Click on Default Category
  • Click button Add Subcategory
  • Fill in category data
  • Save

Expected Output
New category added under the Default Category.

Actual Output

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`magento2-manadev`.`catalog_category_entity_varchar`, CONSTRAINT `CATALOG_CATEGORY_ENTITY_VARCHAR_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CA), query was: INSERT INTO `catalog_category_entity_varchar` (`attribute_id`,`store_id`,`entity_id`,`value`) VALUES (?, ?, ?, ?) ON DUPLICATE KEY UPDATE `value` = VALUES(`value`)

Additional Information
I debugged and it was because of the foreign key constraint in table store from catalog_category_entity_varchar. It was trying to save a varchar attribute in default store (store_id = 0). But the default store does not exist in store table.

@vernard
Copy link
Contributor Author

vernard commented Jul 7, 2015

False alarm. Retried again from fresh installation and it was working. Sorry about that.

@vernard vernard closed this as completed Jul 7, 2015
magento-team pushed a commit that referenced this issue Sep 1, 2017
[EngCom] Public Pull Requests
 - MAGETWO-72192 Added ability to set 'rows' property for wysiwyg elements. #10732
 - MAGETWO-71697 Fix possible bug when saving address with empty street line #10582
 - MAGETWO-71647 Modified Bundle.js because of breaking Encoding in Production Mode. #10563
 - MAGETWO-72126 Disabling of randomly failing and timing out Functional Tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant