Magento 2.3 Reviews error message - We can't post your review right now
If I click "Submit Review" button, I am getting error :
"We can't post your review right now."
Have a any idea? Thank you.
Solutions
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.
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?
- 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()));
}
- 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.