TransWikia.com

Magento 2.3 Reviews error message - We can't post your review right now

Magento Asked by EK. on December 2, 2020

If I click “Submit Review” button,
I am getting error :

“We can’t post your review right now.”

Have a any idea? Thank you.enter image description here

2 Answers

Seems this SQL error

Missed data form some REVIEW* tables.

Maybe after cleanup test data :)

Solution - setup fresh & clean Magento 2.

Copy SQL export of data for tables review_status & review_entity,

import to DB of Magento with review bug.

But be carefull with SQL query.

Answered by Alex on December 2, 2020

Need more detail regarding this. This message is custom not actual. So for debugging purpose can you write a core file and update original error message here?

  1. vendor/magento/module-review/Controller/Product/Post.php

Line 69: add $e->getMessage() which is original exception. Now should looks like:


} catch (Exception $e) {
    $this->reviewSession->setFormData($data);
    $this->messageManager->addError(__('We can't post your review right now.'.$e->getMessage()));
}
  1. Other case is if form validation is wrong. That means Title, Nickname, and Detail should be required field. So added something error message here to.

$this->reviewSession->setFormData($data);
if (is_array($validate)) {
    foreach ($validate as $errorMessage) {
        $this->messageManager->addError($errorMessage);
    }
} else {
    $this->messageManager->addError(__('We can't post your review right now. --- TEST'));
}

Note: After you got an actual exception, then please undo your core change with the original code. Core file modification is not good.

Answered by Sohel Rana on December 2, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP