Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2009
    Posts
    414
    Plugin Contributions
    0

    Default no "body" tag in view source after installing the Simple Google Analytics module

    Hi. I had no validation errors before installing the Simple Google Analytics module. Now there is no </body> code and no </html> code on my home page "view source." My includes/templates/MYTEMPLATE/common/tpl_main_page.php does have the </body> tag right after the added Google Analytics code.

    The tpl_main_page.php last lines are these:

    <div id="bannerSix" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
    <?php
    }
    }
    ?>
    <!--eof- banner #6 display -->
    <?php
    require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
    ?>
    </body>
    The W3C Validator correctly finds no </body> code, which really is absent from view source; and it also finds no </html> but that is not in the tpl_main_page.php template either.

    Validation errors seem fairly easy to spot in define pages, but it is really puzzling why there is no </body> tag showing up on the view source. Is that normal?

    I never thought to check for that previously, so I do not know if it ever was there in the source code of the web page when my page validated correctly. Should I be worried about this?

    And what would be the Zen Cart source file for seeing the </html> tag?

    My website is www.riverfrontsouth.com. I have turned the banner on and off and that makes no difference in the validation result.

    Thanks for any ideas.
    Last edited by notageek; 1 May 2010 at 06:21 AM.

  2. #2
    Join Date
    Mar 2009
    Posts
    414
    Plugin Contributions
    0

    Default Re: no "body" tag in view source after installing the Simple Google Analytics module

    Hi.

    I am still searching for information on what is causing these validation errors; the W3C site says there are 4 errors but it gives all of this information:

    Line 447, Column 31: end tag for "body" omitted, but OMITTAG NO was specified
    <!--eof- banner #6 display -->

    You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

    Line 26, Column 1: start tag was here
    <body id="indexHomeBody">
    Line 447, Column 31: end tag for "html" omitted, but OMITTAG NO was specified
    <!--eof- banner #6 display -->

    You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

    Line 2, Column 1: start tag was here
    <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
    Line 447, Column 30: Premature end of data in tag body line 26
    <!--eof- banner #6 display -->

    Line 447, Column 30: Premature end of data in tag html line 2
    <!--eof- banner #6 display -->
    I have compared my includes/templates/MYTEMPLATE/common/tpl_main_page.php file with another in this forum that is considered correct and there are no differences other than a couple of lines that wouldn't result in a non-closure of a tag.

    I do not know what else to check that would lead to my </body> tag just not showing up in my view source when it is in the tpl_main_page file right after the google analytics command.

    I am feeling I cannot register my site with Google without it validating correctly.

    Any help would be appreciated.

    Notageek

  3. #3
    Join Date
    Mar 2009
    Posts
    414
    Plugin Contributions
    0

    Default Re: no "body" tag in view source after installing the Simple Google Analytics module

    Maybe a clue to the missing </body> tag in the view source is found in the fact that all of my EZ Pages reflect the missing </body> error but are a bit simpler from the main page validation errors, stating as follows:

    Line 428, Column 31: end tag for "body" omitted, but OMITTAG NO was specified
    <!--eof- banner #6 display -->

    You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

    Line 26, Column 1: start tag was here
    <body id="pageBody">
    Line 428, Column 31: end tag for "html" omitted, but OMITTAG NO was specified
    <!--eof- banner #6 display -->

    You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

    Line 2, Column 1: start tag was here
    <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
    Line 428, Column 30: Premature end of data in tag body line 26
    <!--eof- banner #6 display -->

    Line 428, Column 30: Premature end of data in tag html line 2
    <!--eof- banner #6 display -->
    Thanks for any ideas on which php file to check.

  4. #4
    Join Date
    Mar 2009
    Posts
    414
    Plugin Contributions
    0

    Default Re: no "body" tag in view source after installing the Simple Google Analytics module

    I compared my view source file with one that had validated previously, which actually did show the </body> and </html> commands.

    I took out the code for Google Analytics that the Simple Google Analytics instructions say to place just before the </body> tag in includes/templates/MYTEMPLATE/common/main_page_tpl.php, after experimenting with adding and taking away spaces between the code and the </body> tag.

    When I removed the GA code, my home page passed the W3C Validation again and I could once again see the </body> and </html> codes.

    I found a discussion line on Google where some people were discussing the missing </body> tag in a very general way. If I come up with an explanation I will post.

    Is there some other way to use Google Analytics in Zen Cart that allows the </body> and </html> tags to show, or is this what happens with all the methods of adding Google Analytics to one's website?

  5. #5
    Join Date
    Mar 2009
    Posts
    414
    Plugin Contributions
    0

    Default Re: no "body" tag in view source after installing the Simple Google Analytics module

    I found the solution, and posted it in the Simple Google Analytics Support thread, at Post #1245. I'm not sure if the link will work but I think the link to that post is here: http://showthread.php?p=885774#post885774

 

 

Similar Threads

  1. v139h cfkeditor question - "source" view font is too small
    By DarkAngel in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 26 May 2013, 09:41 PM
  2. Replies: 1
    Last Post: 12 Oct 2011, 06:23 AM
  3. Replies: 1
    Last Post: 19 Oct 2010, 01:00 PM
  4. message "table doesnt exist " after installing new module (Australia Post module)
    By topaz07 in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 1 Mar 2008, 02:49 PM
  5. Where is the "view source" page?
    By mikeylikesyou in forum General Questions
    Replies: 4
    Last Post: 23 Jun 2006, 11:07 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