-
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
Unable to Import data in 2.1.0 - "Item (Magento\Catalog\Model\Product\Interceptor) with the same ID "xxx" already exists." #5418
Comments
Apparently duplicated rows are inserted into cataloginventory_stock_item table (either during product import or upgrade, not sure which), that is why this error happens. I used something like |
@OnTapKristjan You are absolutely correct. I did the same and removed duplicate product entries from |
I ran into the exact same issue, when running an product image bulk import. Here's how I went about resolving it: -- Identify if there are any duplicate product entries in the cataloginventory_stock_item table -- This SQL will show you a list of all the duplicate item rows in the cataloginventory_stock_item table. -- Use this SQL to delete the duplicate rows. Issue resolved. |
You can use below query to get duplicate item_ids ( if you have large number of duplicate entries). select n1.item_id from cataloginventory_stock_item n1, cataloginventory_stock_item n2 where n1.item_id > n2.item_id and n1.product_id = n2.product_id; |
Hi @arvind07 Thank you for reporting this issue. |
Hello, I have also duplicate entries in table cataloginventory_stock_item and fetched duplicate entries as below But both entries have different website_id where I am maintaining different stock for different stores, so I can not remove these duplicates. Is there any other solution or Magento2 itself adding stock entries in wrong way? |
If you don't have stock managed by store, you can use this to fix issue in one SQL request:
|
As I cannot see the state of the internal ticket MAGETWO-58075 --> does anyone know the state there? We facing the same problem and would need a fix for it. |
@shiftedreality any updates on this? Is MAGETWO-58075 already solved for EE customers? Does it also happen when i freshly start with latest 2.1.2? thanks |
Hi @rattomago Current issue is not fixed yet. |
@rattomago, I'm running 2.1.2 that I installed today, and this problem is present. Duplicated entries |
Same issue with 2.1.2. Any update when can we expect the fix ? |
Same here |
I had to deal with this bug, so I worked on a dirty workaround an documented it here: The Workaround is based on @Yonn-Trimoreau Solution. Hope this helps some of you until the bug has been fixed |
Thanks for linking me back @DavidLambauer |
Still present in Magento 2.1.5. |
This problem exist duo to difference between products "website_id" value and default value in Magneto 2Table: cataloginventory_stock_item so first |
Has this been fixed yet post 2.1.5? |
@webspeaks, thank you for your report. |
I love Magento team's issue management. If the issue can be closed for whatever reason, let's close it, otherwise, let's not fix it and may it die in the void. It seems like you only fix security issues.. But what about functional issues ? I'm following around 20 issues with 10+ comments confirming the issue, and Magento team is always responding 2 years later saying that they cannot reproduce the issue (and obviously, the issue's author is gone for a long time). Looks like we'll still be making patchwork in a decade (or two). Still, Magento is the only serious solution for professionnal e-commerce on PHP (to me). But that could be way better if issues were managed correctly. I'm wondering where the Magento Enterprise money goes. Certainly not into hiring a sufficient number of developers.. |
@Yonn-Trimoreau I partly agree! I also experienced quick issue closing without taking care of the actual result. Seems to be every time Magento 2 has to release something and can tell "We have closed X Issues". A little bit more patient for the issues would be great, even if they are not solvable by the M2 Team itself, there might be someone from the community who can help. |
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 on the frontend even after re-indexing with cache disabled. Enabled cache, and we get this error (issue 5418). 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. Additionally, we have no duplicate rows. Now what? |
[honey-combined-PR23] MC-31420: [GraphQL] Flat Rate shipping amount is returned as $10 instead of $5 for 1st configurable product in cart.
Steps to reproduce
Expected result
Actual result
a:4:{i:0;s:87:"Item (Magento\Catalog\Model\Product\Interceptor) with the same ID "145" already exists.";i:1;s:7473:"#0 magento2\vendor\magento\module-eav\Model\Entity\Collection\AbstractCollection.php(304): Magento\Framework\Data\Collection->addItem(Object(Magento\Catalog\Model\Product\Interceptor))
i have to delete the product from database to make get the site running. I am running Magento 2.1.0.
Thanks
The text was updated successfully, but these errors were encountered: