Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    Mar 2010
    Posts
    251
    Plugin Contributions
    0

    Default Validating Product Info Page

    Hi,

    I am trying to validate my product info page and am receiving 40 errors which I am at a loss as to fix.

    The first error I receive is -

    Code:
    Line 575, Column 35: document type does not allow element "div" here
    
    <div class="wrapperAttribsOptions"><table border="1" style="border: 1px solid #…
    
    ✉
    
    The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).
    
    One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
    The site address is - w w w dot c u z h y dot c o dot uk/index.php?main_page=product_info&cPath=4_41_22&products_id=41

    Thanks to anyone that can help.

  2. #2
    Join Date
    Mar 2010
    Posts
    251
    Plugin Contributions
    0

    Default Re: Validating Product Info Page

    anyone?


  3. #3
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: Validating Product Info Page

    Moderators note: It has only been a few hours since your initial post - give it some time and don't bump your post.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  4. #4
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: Validating Product Info Page

    Quote Originally Posted by moesoap View Post
    Hi,

    I am trying to validate my product info page and am receiving 40 errors which I am at a loss as to fix.

    The first error I receive is -

    Code:
    Line 575, Column 35: document type does not allow element "div" here
    
    <div class="wrapperAttribsOptions"><table border="1" style="border: 1px solid #…
    
    ✉
    
    The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).
    
    One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
    The site address is - w w w dot c u z h y dot c o dot uk/index.php?main_page=product_info&cPath=4_41_22&products_id=41

    Thanks to anyone that can help.
    Quote Originally Posted by moesoap View Post
    anyone?

    The main problem is that you are missing closing </table> and </div> throughout the layout.

  5. #5
    Join Date
    Mar 2010
    Posts
    251
    Plugin Contributions
    0

    Default Re: Validating Product Info Page

    Quote Originally Posted by Kim View Post
    Moderators note: It has only been a few hours since your initial post - give it some time and don't bump your post.
    Apologies, I am anxious to finish this.

    Thanks Clyde,

    The tables are pulled from the module attributes php file and they all appear to be closed in there. Apart from three tables within the product info page which are closed also.

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Validating Product Info Page

    The fundamental cause is some editing error when you (or the mod author) added the custom table code to the attributes output.

  7. #7
    Join Date
    Mar 2010
    Posts
    251
    Plugin Contributions
    0

    Default Re: Validating Product Info Page

    Quote Originally Posted by gjh42 View Post
    The fundamental cause is some editing error when you (or the mod author) added the custom table code to the attributes output.
    I added tables to the module below.

    PHP Code:
    <?php
    /**
     * Module Template
     *
     * Template used to render attribute display/input fields
     *
     * @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_modules_attributes.php 3208 2006-03-19 16:48:57Z birdbrain $
     */
    ?>
    <div id="productAttributes">
    <?php if ($zv_display_select_option 0) { ?>
    <h3 id="attribsOptionsText"><?php echo TEXT_PRODUCT_OPTIONS?></h3>
    <?php // show please select unless all are readonly ?>

    <?php
        
    for($i=0;$i<sizeof($options_name);$i++) {
    ?>
    <div class="attcontrolcomments"><table border="1" style="border: 1px solid #FFC000;" bgcolor="#FFFFCC" width="500" cellpadding="3" cellspacing="3"><?php
      
    if ($options_comment[$i] != '' and $options_comment_position[$i] == '0') {
    ?>
    <tr><td><h3 class="attributesComments"><?php echo $options_comment[$i]; ?></h3></td></tr></table></div>
    <?php
      
    }
    ?>

    <div class="wrapperAttribsOptions"><table border="1" style="border: 1px solid #FFC000;" bgcolor="#FFFFCC" width="500" cellpadding="3" cellspacing="3">
        <tr>
            <td><h4 class="optionName back"><?php echo $options_name[$i]; ?></h4></td>
        </tr>
        <tr>
            <td><div class="back"><?php echo "\n" $options_menu[$i]; ?></div>
    <?php
    if ($options_attributes_image[$i] != '') {
    ?>
    <?php 
    echo $options_attributes_image[$i]; ?></td>
    </tr>
    </table></div>
    <?php
    }
    ?>
    <?php 
    if ($options_comment[$i] != '' and $options_comment_position[$i] == '1') { ?>
        <div class="ProductInfoComments"><?php echo $options_comment[$i]; ?></div>
    <?php ?>
    <?php
        
    }
    ?>


    <?php
      
    if ($show_onetime_charges_description == 'true') {
    ?>
        <div class="wrapperAttribsOneTime"><?php echo TEXT_ONETIME_CHARGE_SYMBOL TEXT_ONETIME_CHARGE_DESCRIPTION?></div>
    <?php ?>


    <?php
      
    if ($show_attributes_qty_prices_description == 'true') {
    ?>
        <div class="wrapperAttribsQtyPrices"><?php echo zen_image(DIR_WS_TEMPLATE_ICONS 'icon_status_green.gif'TEXT_ATTRIBUTES_QTY_PRICE_HELP_LINK1010) . '&nbsp;' '<a href="javascript:popupWindowPrice(\'' zen_href_link(FILENAME_POPUP_ATTRIBUTES_QTY_PRICES'products_id=' $_GET['products_id'] . '&products_tax_class_id=' $products_tax_class_id) . '\')">' TEXT_ATTRIBUTES_QTY_PRICE_HELP_LINK '</a>'?></div>
    <?php ?>
    </div>

  8. #8
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Validating Product Info Page

    Code:
    <div class="attcontrolcomments"><table border="1" style="border: 1px solid #FFC000;" bgcolor="#FFFFCC" width="500" cellpadding="3" cellspacing="3"><?php
      if ($options_comment[$i] != '' and $options_comment_position[$i] == '0') {
    ?>
    <tr><td><h3 class="attributesComments"><?php echo $options_comment[$i]; ?></h3></td></tr></table></div>
    <?php
      }
    ?>
    You open the div and table, and then close them inside a conditional segment so they will actually only close if the condition is true. If the condition is false, they never close.
    Move the closing </table></div> to below the } so they are always executed.
    Code:
    <div class="attcontrolcomments"><table border="1" style="border: 1px solid #FFC000;" bgcolor="#FFFFCC" width="500" cellpadding="3" cellspacing="3"><?php
      if ($options_comment[$i] != '' and $options_comment_position[$i] == '0') {
    ?>
    <tr><td><h3 class="attributesComments"><?php echo $options_comment[$i]; ?></h3></td></tr>
    <?php
      }
    ?>
    </table></div>

  9. #9
    Join Date
    Mar 2010
    Posts
    251
    Plugin Contributions
    0

    Default Re: Validating Product Info Page

    Quote Originally Posted by gjh42 View Post
    Code:
    <div class="attcontrolcomments"><table border="1" style="border: 1px solid #FFC000;" bgcolor="#FFFFCC" width="500" cellpadding="3" cellspacing="3"><?php
      if ($options_comment[$i] != '' and $options_comment_position[$i] == '0') {
    ?>
    <tr><td><h3 class="attributesComments"><?php echo $options_comment[$i]; ?></h3></td></tr></table></div>
    <?php
      }
    ?>
    You open the div and table, and then close them inside a conditional segment so they will actually only close if the condition is true. If the condition is false, they never close.
    Move the closing </table></div> to below the } so they are always executed.
    Code:
    <div class="attcontrolcomments"><table border="1" style="border: 1px solid #FFC000;" bgcolor="#FFFFCC" width="500" cellpadding="3" cellspacing="3"><?php
      if ($options_comment[$i] != '' and $options_comment_position[$i] == '0') {
    ?>
    <tr><td><h3 class="attributesComments"><?php echo $options_comment[$i]; ?></h3></td></tr>
    <?php
      }
    ?>
    </table></div>
    Thanks, Its removed those errors but now I am getting the following validation errors -

    Code:
    Line 574, Column 155: end tag for "table" which is not finished
    
    …;" bgcolor="#FFFFCC" width="500" cellpadding="3" cellspacing="3"></table></div>
    
    ✉
    
    Most likely, you nested tags and closed them in the wrong order. For example <p><em>...</p> is not acceptable, as <em> must be closed before <p>. Acceptable nesting is: <p><em>...</em></p>
    
    Another possibility is that you used an element which requires a child element that you did not include. Hence the parent element is "not finished", not complete. For instance, in HTML the <head> element must contain a <title> child element, lists require appropriate list items (<ul> and <ol> require <li>; <dl> requires <dt> and <dd>), and so on.
    Last edited by moesoap; 27 Jun 2011 at 06:38 PM.

  10. #10
    Join Date
    Mar 2010
    Posts
    251
    Plugin Contributions
    0

    Default Re: Validating Product Info Page

    Thanks to gjh42 this is now down to 6 errors.

    I am still receiving the one listed above and have now noticed that easypopulate 1.2.5.4 is converting <ul id="productDetailsList"> into <ul id=”productDetailsList”> when I add it to the database.

    Anyone know why? or the answer to the table error above?

    Thanks.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Page validating (error checking)
    By marcopolo in forum General Questions
    Replies: 4
    Last Post: 19 Oct 2015, 10:04 PM
  2. v151 Product info page blank but shows template no info
    By Pablo_escobar in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 17 Jan 2014, 11:17 PM
  3. Product Info Page: Moving Product Name Up On Product Info Page
    By khopek in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 19 Feb 2010, 08:01 AM
  4. Validating product_info page
    By Sake in forum General Questions
    Replies: 1
    Last Post: 23 May 2007, 08:05 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