If this is your first visit, check our documentation. To post, register or login.
Forums / Upgrading Your Zen Cart / Upgrading from 1.3.x to 1.3.9 / ID "reviewsContent" already defined

ID "reviewsContent" already defined

Locked

Started by royal on 26 May 2010, 4:29 PM · Views: 1,909

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
26 May 2010, 4:29 PM
#1
royal avatar

royal

Zen Follower

Join Date:
Jun 2008
Location:
Canada
Posts:
261
Plugin Contributions:
0

Post #1 by royal

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

26 May 2010, 11:42 PM
#2
royal avatar

royal

Zen Follower

Join Date:
Jun 2008
Location:
Canada
Posts:
261
Plugin Contributions:
0

Post #2 by royal

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

<?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

<?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

28 May 2010, 12:34 AM
#3
royal avatar

royal

Zen Follower

Join Date:
Jun 2008
Location:
Canada
Posts:
261
Plugin Contributions:
0

Post #3 by royal

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