Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,870
    Plugin Contributions
    96

    Default 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:
    Code:
      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:
    Code:
      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);
      }

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,870
    Plugin Contributions
    96

    Default Re: Write Reviews errors not going to the right page

    ... and then \includes\templates\template_default\tpl_product_reviews_write_default needs to add the following line to actually display the messages:

    Code:
    <?php if ($messageStack->size('product_reviews_write') > 0) echo $messageStack->output('product_reviews_write'); ?>
    <div class="centerColumn" id="reviewsWrite">

  3. #3
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Write Reviews errors not going to the right page

    Actually, leaving the key as 'review_text' will work just fine on a clean default install, since the output for that key is already in the tpl_product_reviews_write_default.php file, on line 44:
    Code:
    <?php if ($messageStack->size('review_text') > 0) echo $messageStack->output('review_text'); ?>
    So, it would appear that the "bug" is in your own template somewhere, and not in the default core code of v1.3.8a.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,870
    Plugin Contributions
    96

    Default Re: Write Reviews errors not going to the right page

    You are (as always) correct; it was my mess-up.

 

 

Similar Threads

  1. v139g Error: I can not write to this file. Please set the right user permissions
    By Intrepidations in forum Addon Sideboxes
    Replies: 1
    Last Post: 5 Jul 2012, 04:42 PM
  2. Category links not going to the right page...
    By Pepperfire in forum Upgrading from 1.3.x to 1.3.9
    Replies: 14
    Last Post: 1 Feb 2012, 10:50 PM
  3. Replies: 2
    Last Post: 29 Mar 2011, 03:44 PM
  4. Help? Product Image not showing up on reviews write page...
    By joyjoy in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 12 Nov 2010, 11:32 PM
  5. Login page problem..not going to right page
    By aggiesoap in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 28 Jun 2007, 12:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg