Administrator
- Join Date:
- Sep 2009
- Location:
- Stuart, FL
- Posts:
- 14,097
- Plugin Contributions:
- 56
Write Reviews errors not going to the right page
Running 1.38a + security + FEC:
If javascript is disabled, so the error-checking falls within the server's realm, none of the input errors are displayed for the "Write a Review" page. The culprit appears to be \includes\modules\pages\product_reviews_write\header.php, starting at line 56:
if (strlen($review_text) < REVIEW_TEXT_MIN_LENGTH) {
$error = true;
$messageStack->add('review_text', JS_REVIEW_TEXT);
}
if (($rating < 1) || ($rating > 5)) {
$error = true;
$messageStack->add('review_text', JS_REVIEW_RATING);
}
Which should be:
if (strlen($review_text) < REVIEW_TEXT_MIN_LENGTH) {
$error = true;
$messageStack->add('product_reviews_write', JS_REVIEW_TEXT);
}
if (($rating < 1) || ($rating > 5)) {
$error = true;
$messageStack->add('product_reviews_write', JS_REVIEW_RATING);
}