Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2008
    Location
    Canada
    Posts
    274
    Plugin Contributions
    0

    Default ID "reviewsContent" already defined

    Hello,

    I'm getting this validation error.

    Line 199, Column 900: ID "reviewsContent" already defined

    …dth="90" height="20" /></div><div id="reviewsContent" class="sideBoxContent ce…


    An "id" is a unique identifier. Each time this attribute is used in a document it must have a different value. If you are using this attribute as a hook for style sheets it may be more appropriate to use classes (which group elements) than id (which are used to identify exactly one element).


    Line 199, Column 10: ID "reviewsContent" first defined here

    <div id="reviewsContent" class="sideBoxContent centeredContent"><a href="http:/…
    I tried the Developers Tool Kit.

    How can I fix it?

    -------------------------------------------------------------------

    Zen Cart 1.3.9c
    Database Patch Level: 1.3.9c
    v1.3.9c [2010-05-24] (Version Update 1.3.8->1.3.9c)
    v1.3.8 [2008-01-03] (Fresh Installation)
    Pre-Owned Books and Second Hand Stuff: http://www.onlineyardsale.ca

  2. #2
    Join Date
    Jun 2008
    Location
    Canada
    Posts
    274
    Plugin Contributions
    0

    Default Re: ID "reviewsContent" already defined

    Notice the differenct between 1.3.8a and 1.3.9c tpl_reviews_random.php.

    includes/templates/Your_templates/sideboxes/tpl_reviews_random.php.

    Version: 1.3.9c

    Code:
    <?php
    /**
     * Side Box Template
     *
     * @package templateSystem
     * @copyright Copyright 2003-2010 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_reviews_random.php 16044 2010-04-23 01:15:45Z drbyte $
     */
      $content = "";
      $review_box_counter = 0;
      while (!$random_review_sidebox_product->EOF) {
        $review_box_counter++;
        $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';
        $content .= '<a href="' . zen_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_review_sidebox_product->fields['products_id'] . '&reviews_id=' . $random_review_sidebox_product->fields['reviews_id']) . '">' . zen_image(DIR_WS_IMAGES . $random_review_sidebox_product->fields['products_image'], $random_review_sidebox_product->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<br />' . zen_trunc_string(nl2br(zen_output_string_protected(stripslashes($random_review_sidebox_product->fields['reviews_text']))), 60) . '</a><br /><br />' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'stars_' . $random_review_sidebox_product->fields['reviews_rating'] . '.gif' , sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $random_review_sidebox_product->fields['reviews_rating']));
        $content .= '</div>';
        $random_review_sidebox_product->MoveNextRandom();
      }

    Version: 1.3.8a

    Code:
    <?php
    /**
     * Side Box Template
     *
     * @package templateSystem
     * @copyright Copyright 2003-2005 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_reviews_random.php 2982 2006-02-07 07:56:41Z birdbrain $
     */
      $content = "";
      $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';
      $content .= '<a href="' . zen_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_review_sidebox_product->fields['products_id'] . '&reviews_id=' . $random_review_sidebox_product->fields['reviews_id']) . '">' . zen_image(DIR_WS_IMAGES . $random_review_sidebox_product->fields['products_image'], $random_review_sidebox_product->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<br />' . $review_box_text . ' ..</a><br /><br />' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'stars_' . $random_review_sidebox_product->fields['reviews_rating'] . '.gif' , sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $random_review_sidebox_product->fields['reviews_rating']));
      $content .= '</div>';
    ?>

    When I replace 1.3.9c code with the 1.3.8a. I have no validation errors.

    How can I correct tpl_reviews_random for version 1.3.9c?
    Pre-Owned Books and Second Hand Stuff: http://www.onlineyardsale.ca

  3. #3
    Join Date
    Jun 2008
    Location
    Canada
    Posts
    274
    Plugin Contributions
    0

    Default Re: ID "reviewsContent" already defined

    In Admin: Configuration/Maximum Values

    I notice that I only have the validation error when I set "Random Product Reviews for SideBox" to 2.

    When I set "Random Product Reviews for SideBox" to 1. There is no validation error.

    ----------------------------------------------------------------------------------------------------

    My admin setting:

    New Product Reviews Per Page: 5
    Random Product Reviews for SideBox: 1

    So as long as I have "Random Product Reviews for SideBox set to 1. There is no validation error.

    -----------------------------------------------------------------------------------------------------

    Version 1.3.9c
    Pre-Owned Books and Second Hand Stuff: http://www.onlineyardsale.ca

 

 

Similar Threads

  1. Replies: 5
    Last Post: 9 Feb 2013, 08:10 PM
  2. Alert Pay addon: "ap_shipping charges is not defined"
    By Rexmonster80 in forum Addon Payment Modules
    Replies: 0
    Last Post: 7 Sep 2010, 12:10 PM
  3. "No products have been defined" message means? and what do I do about it?
    By genlancaster in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 13 May 2009, 11:56 PM
  4. Where is the "Home" url defined?
    By bonmot in forum General Questions
    Replies: 4
    Last Post: 2 Dec 2008, 03:56 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