cancel
Showing results for 
Search instead for 
Did you mean: 

Item (Magento\Review\Model\Review\Interceptor) with the same ID "5" already exists.

Item (Magento\Review\Model\Review\Interceptor) with the same ID "5" already exists.

Steps to reproduce

  1. On product detail page override theme here Magento_Catalog->layout->catalog_product_view.xml,here i paste this code
    <referenceContainer name="product.info.additional"> <block class="Magento\Review\Block\Product\View\ListView" name="custom.product.section.info" template="Magento_Review::product/view/list.phtml"/> </referenceContainer>

Expected result

1.Show Customer Reviews

Actual result

1 exception(s):
Exception #0 (Exception): Item (Magento\Review\Model\Review\Interceptor) with the same ID "5" already exists.

1 REPLY 1

Re: Item (Magento\Review\Model\Review\Interceptor) with the same ID "5" already exists.

Seems your collection is loading multiple items which has more than 1 row with ID.  So please check your query try printing it and execute in phpmyadmin check if same ID exists then you can delete it from Database or if you are using customized collection then you can use Group by clasue.

Manish Mittal
https://www.manishmittal.com/