I've deleted my previous question and narrowed down the true issue causing this problem. For some reason, the review_detail table is creating duplicates whenever a review has it's status changed.

Review IDs 6 was left by my test customer account before i saw the issue

Reviews with ID 7 through 11 were left via admin and auto approved as such.

Review IDs 12 was me testing the theory of duplicates in this table.

I noticed that the detail_id field is NULL, but in my other stores has a value - is this a problem with a foreign key? How can I re-establish this link and hopefully stop the duplicates from being created?

This is the broken table:

This is the broken table

This is what a working table looks like:

enter image description here

Not only am I missing information in the "detail_id" column, but the table is not editable and missing all the per-row controls.

Is there some master script I can run to re-establish all foreign keys between tables?

----- EDIT August 30 -----

I may have fixed the issue, but am not sure it's the best way to do it. It seems like the table's structure was lost/broken - so I did a fresh install of Magento in a separate folder, went to the new database and exported just the "review_detail" table with structure (no data), renamed the broken table, and imported the clean table into the database.

This seems to have fixed the problem but more testing needs to be done.

  • Did you install any extension or wrote custom code for "Reviews" ??? – Abhishek Panchal Aug 30 '17 at 18:00
  • Yes, an extension that imports products and reviews from Amazon was installed on the original live site this database was imported from. I am running this duplicate of the database in a Staging area without that extension enabled. – Steven J Aug 30 '17 at 18:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.