magento2: Error when saving product in catalog/products
Preconditions (*)
- Mysql 8.0.21
- Php 7.3.19
Steps to reproduce (*)
- In backend, catalog/products
- Click to save
Expected result (*)
- Product saved without error
Actual result (*)
- SQLSTATE[23000]: Integrity constraint violation: 1052 Column ‘store_id’ in where clause is ambiguous, query was: SELECT
main_table.* FROMurl_rewriteASmain_tableINNER JOINcatalog_product_entityASproduct_entityON main_table.entity_id = product_entity.entity_id INNER JOINcatalog_product_entity_intASproduct_status_defaultON product_status_default.entity_id = product_entity.entity_id AND product_status_default.attribute_id = 97 AND product_status_default.store_id = 0 LEFT JOINcatalog_product_entity_intASproduct_statusON product_status.entity_id = product_entity.entity_id AND product_status.attribute_id = 97 AND product_status.store_id = main_table.store_id WHERE (redirect_type= ‘0’) AND (entity_type= ‘product’) AND (store_idIN(‘1’, 0)) AND ((product_status.value_id > 0 AND product_status.value IN (1)) OR (product_status.value_id IS NULL AND product_status_default.value IN (1))) AND (product_entity.entity_id= ‘88514’)
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- [*] Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 17 (1 by maintainers)
@achatpc @JKetelaar created a new issue here https://github.com/magento/magento2/issues/31853
I confirm that issue is linked with amasty/module-fpc-warmer. If you disable the option “Auto-update Cache upon the Product Changes” everything seems to work again without any change in UrlRewriteCollection.php
I reported issue to Amasty support
Hello all.
In my side issue was related with mirasvit seo extension.
I can solve it with changement in:
/var/www/html/vendor/magento/module-url-rewrite/Model/ResourceModel/UrlRewriteCollection.php : $this->addFieldToFilter (‘main_table.store_id’, [‘in’ => $store]);
If you need i can send détails of file change.