-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Item (Magento\Catalog\Model\Product\Interceptor) with the same ID "##" already exists. #6126
Comments
Exact same thing here... let me know if you find a solution |
One of our clients run into similar issue recently and found out there were duplicate product IDs in the database each with different Store IDs (1 and 2). They ended up deleting products with Store ID 2 as a workaround. Hope it helps. |
We are facing the same error, Is there any permanent fix ? |
We have the same problem with It seems that the query is producing duplicated rows when joining
The We just have to find out, where we can add that in the code 😄. |
A
|
Hi Gordon, This is temporary fix but its not the solution as M2 adding duplicate entries on "cataloginventory_stock_item" table while importing the products. We need to fix this issue as soon as possible. While updating any products it is re-entering the new rows for updated products . Thanks, |
This is a known issue MAGETWO-57490, thanks for posting |
vendor/magento/framework/Data/Collection.php line : 406
become => below, wait for M2 fix
|
This problem exist duo to difference between products "website_id" value and default value in Magneto 2 Table: cataloginventory_stock_itemSo do the following : |
Like above said, Magento 2 admin is not preped for diff website_id 's in the stock item table. I had to use different website_id. In case You would like to use stock per website you could preference (admin di.xml) the "Magento\CatalogInventory\Ui\DataProvider\Product\AddQuantityFieldToCollection" and add "AND {{table}}.website_id=0".
|
has this been fixed in post 2.1.5? |
@Stylish015, thank you for your report. |
Got this issue after upgrading from 2.1.8 to 2.2.0 |
Problem is ALIVE & WELL as of November 17, 2017 in v. 2.2.1. Used Save & Duplicate to create product #2. Product #2 never appeared even after re-indexing with cache disabled. Enabled cache, and we get this error. We also moved one category (#43) up in position. It is this #43 that is mentioned in the error report. After re-enabling cache, product #2 is now there, but still no navigation categories. Enable cache again and the error returns. |
I found out that my product_index_eav_decimal sometimes has multiple values for the same entity id while if i search that entity id in the attribute_decimal table or in the product table it has only 1 value. How does this table gets generated? |
@smagic39 Thankyou , it works for me |
Hello, we have magento 2.2.6 with different stores, and after hours of search only the fix in collection.php from smagic39 worked
We have the question
|
I can reproduce this issue in version 2.3.0 well anytime: |
|
I can't reproduce with a clear M2.3.0 install but only an other existing store with some extension, maybe there are some data inconsistencies around the cataloginventory_stock_item table..... Here is a plus one record. |
Hi guys how are you?, I create a very simple module with plugin inside in order to prevent this issue. https://github.com/amarroni/magento-framework-data-collection Please is just a code to not touch the code. Best, |
Encountered this error in Magento 2.3.1. In our case it was related to double values in the table "review_entity_summary". To check if this is the case for your database use the following SQL query:
In my opinion these tables should use a unique index to prevent this from happing (in this example a unique index over entity_type, entity_pk_value and store_id). |
Got this in migrated Magento2.3.2 store. |
I've also experienced this, again, down to a duplicate, but for me, it was actually an attribute that was assigned to an attribute set twice. Not sure how it happened, but wanted to record it here for reference. Table concerned was |
[honey][MultipleWishlist] Adding GraphQl coverage for MultipleWishlist and GiftCard
this issue still appears in admin area if multiple websites and different prices for each websites. There is "SELECT DISTINCT" in collection query which affects the result. In frontend it works then because I guess there is a filter with only 1 website-ID. |
Yea, I just bumped into this exact issue as well within pagebuilder. It's particularly nasty there because I can't modify/delete the broken content... |
We also have this issue on 2.3.7, we use Page Builder too and have several websites / customer groups. We reproduce this issue when we use a Products widget on Page Builder. The query that is causing this issue is the following one as it returns several times the same SKU:
@jurvi did you find a way to fix this issue? |
We also had this issue using a module with multiple warehouses and the issue is due to a query to the database where the magento developers forgot to filter by website ID. All the others have the websiteId filtered but this specific query does not. The file in question is /vendor/magento/module-inventory-catalog/Model/ResourceModel/AddStockDataToCollection.php line 65 this query is built
As you can see it does not filter the website ID, so after this I added below
Of course the $this->legaycStockConfiguration needs to be declared for that add the following: next to all other "use" add:
define a new variable on the class
Initialize this on the construct
btw, this code was based on code from /vendor/magento/module-inventory-catalog/Model/ResourceModel/SetDataToLegacyStockStatus.php that already takes in consideration the website id |
this issue also exist in magento 2.4.3-p1. Guys, any resolution for this issue ? |
Hello guys, I'm also struggling with this issue. The main problem was that query: SELECT DISTINCT `e`.*, was selecting products with the same The solution was in adding a website protected function _beforeLoad() |
Using the in-built Product Importer we have been successfully updating our product quantities in bulk within Mangeto 2.0.5.
However since we have upgraded to Magento 2.1.0, and after a Product Import updating qty's, we get an error:
Item (Magento\Catalog\Model\Product\Interceptor) with the same ID "4" already exists.
This error shows in the Admin while trying to view products on "Products -> Catalog"
Steps to reproduce
Expected result
For the import to be successful.
It updates the product quantities successfully.
You can still view products in the Admin at "Products -> Catalog"
Actual result
While viewing Products in the Admin at "Products -> Catalog" get the error:
Item (Magento\Catalog\Model\Product\Interceptor) with the same ID "4" already exists.
Is this a bug?
Can it be fixed so we can view our products in the Admin?
Thanks.
The text was updated successfully, but these errors were encountered: