ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

error with Doctype

March 12, 2012 11:26am

Subscribe [2]
  • #1 / Mar 12, 2012 11:26am

    Federacafe

    11 posts

    i have a error, when ee generate my site puts several spaces before <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
    then don’t take the css rules on explorer

    ”                  <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
    <html>
    <head> “

    thx a lot

  • #2 / Mar 12, 2012 8:16pm

    Sean C. Smith

    3818 posts

    Hi Federacafe,

    I’m sorry that you are having this problem. What version of ExpressionEngine are you using and could you post up the contents of the template that is having this trouble?

    Sean

  • #3 / Mar 13, 2012 10:30am

    Federacafe

    11 posts

    hi Sean thanks for your help

    i have ExpressionEngine 1.6.7, with 14 sites but it only one show the problem

    the webpage are http://narino.cafedecolombia.com/ and http://cauca.cafedecolombia.com/ and both show problems with the css in explorer

    and finaly the template is:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>{site_name}</title>
     <!-- Header Code -->
    {embed="fnc/inc_header_code"}
    [removed][removed]
     <!-- /Header Code -->
    </head>
     
    <body>
    <div id="cuerpo">
     <!-- Header -->
    {embed="fnc/inc_header"}
        <!-- /Header -->
        <!-- Breadcumb- Search-->
    {embed="fnc/inc_breadcumb_search"}
        <!-- /Breadcumb- Search-->
        <!-- Top Navbar -->
    {embed="fnc/inc_top_navbar"}
        <!-- /Top Navbar -->
        <div id="centro">
         <div class="col">
          <ul id="sidenav" class="bullet">
           <li><a href="/{country_code}/narino/el_departamento/">{if country_code == "es"}La Región{if:else}The Region{/if}</a></li>
           <li><a href="/{country_code}/narino/el_cafe_de_narino/">{if country_code == "es"}Café de Nariño{if:else}Café de Nariño{/if}</a></li>
           <li><a href="/{country_code}/narino/solo_para_expertos/">{if country_code == "es"}Sólo para Expertos{if:else}Only for Experts{/if}</a></li>
           <li><a href="/{country_code}/narino/viaje_virtual_a_narino_visitenos_ya/">{if country_code == "es"}Caminos del Café - Viaje Virtual al Origen{if:else}Coffee Journey - Virtual Trip to Origins{/if}</a></li>
           <li><a href="/{country_code}/narino/sostenibilidad_en_accion/">{if country_code == "es"}Sostenibilidad en Acción{if:else}Sustainability that Matters{/if}</a></li>
           <li><a href="/{country_code}/narino/marcas_de_cafe_de_narino/">{if country_code == "es"}Marcas de Café de Nariño{if:else}Nariño Coffee Brands {/if}</a></li>
           <li><a href="/{country_code}/narino/descargas/">{if country_code == "es"}Descargas{if:else}Downloads{/if}</a></li>
          </ul>
         </div>
         <div>
         {exp:weblog:entries entry_id="824" limit="1"}
         
         {micro_es}
         
         {/exp:weblog:entries}
    </div>
     </div>
     <!-- Footer -->
    {embed="fnc/inc_footer"}
       <!-- /Footer -->
    </div>
    </body>
    </html>
  • #4 / Mar 13, 2012 7:45pm

    Sean C. Smith

    3818 posts

    Hi Federacafe,

    I don’t see anything wrong with that code strait away. Could you post up the code of your {embed="fnc/inc_header_code"} as well. I also see that you have some javascript that was eaten by the forum - feel free to post that using a pastie. Finally, could you list all the third party addons that you are using on this site?

    I would also like to recommend that you upgrade to 1.7.2 if possible.

    Sean

  • #5 / Mar 14, 2012 12:35pm

    Federacafe

    11 posts

    hi Sean

    look the {embed=“fnc/inc_header_code”} is:

    <link rel="shortcut icon" href="/favicon.ico" />
    <link rel="stylesheet" type="text/css" media="all" href="/index.php?css=fnc/css_es" />
    {if country_code == "es"}
    <style>
    .en{display:none}
    .es{display:inline}
    </style>
    {if:else}
    <style>
    .es{display:none}
    .en{display:inline}
    </style>
    {/if} 
    <link rel="stylesheet" type="text/css" media="all" href="/index.php?css=fnc/common" />
    [removed][removed] 
    [removed]google.load("jquery", "1.2.6")[removed] 
    
    <!--[if lt IE 9]>
    [removed][removed]
    <![endif]-->
    
    
    <!-- Lang switch -->
    [removed]
    <!--
     function switchLanguage(lang) {
         u = location.href.split('/');
         u[3] = lang;
         location.href = u.join('/');
     }
    //-->
    [removed]

    Extensions Manager
    LG Live Look (v.1.0.4)            Enabled
    Structure Extension (v.1.2.7)      Enabled
    LG TinyMCE (v.1.3.3)            Enabled
    Tag Submit (v.2.6.3)            Enabled
    jQuery for the Control Panel (v.1.1.1) Enabled
    LG Add Sitename (v.1.2.0)      Enabled
    Category Checkboxes (v.1.1.2)  Enabled
    Mobify (v.0.9.2)            Disabled
    FieldFrame (v.1.3.5)        Enabled (Disable?)
    Category Permission Extension (v.1.0.0) Enabled (Disable?)
    Entry Permissions (v.1.2.2)  Disabled (Enable?)


    and finaly http://pastie.org/3594760.js this is the code of my index.

  • #6 / Mar 15, 2012 4:47pm

    Dan Decker

    7338 posts

    Hi Federacafe,

    The only difference I can see between what you have in your template and examples I was able to find are a line break:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    If you add a line break to your declaration at that same point, does the whitespace go away?

    Cheers,

  • #7 / Mar 16, 2012 5:30pm

    Federacafe

    11 posts

    hi, dan and sean thanks a lot for help
    but any recomendation work well. I trying to describe the site becouse i wanna you have a better idea
    let me tell you, this site has 2 parts, each one have a diferent index,  the first one (fnc) has a little part of code, with the line break it suggested dan:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <head>
    <title>{site_name}</title>
    [removed]
    var time = null
    function pageredir() {
    [removed] = '{site_url}'
    }
    [removed]
    </head>
    <body >
    Será redirigido al sitio principal en pocos segundos, si no ocurre favor <a href="http://{site_url}">siga este enlace.</a> Gracias.
    </body>
    </html>

    the second part (particulares), which i put in #2 post,it already has the line break.

    if i check the database on the templates table i don’t see extrange simbols and anything out off normal.
    plus that, ee has 14 sites and only one with this problem, if you want, you could check http://www.cafedecolombia.com and www.federaciondecafeteros.org

  • #8 / Mar 19, 2012 12:11pm

    Shane Eckert

    7174 posts

    Hello Federacafe,

    I am sorry to hear this is still an problem.

    Can you try entering the text in by hand? Just drop the doctype down one line, then type the line above it and then blow away the original doctype line. Maybe there is some formatting that is messing things up.

    Thank you,

  • #9 / Mar 21, 2012 1:00pm

    Federacafe

    11 posts

    hi shane
    i trying everything you are saying but anything works

  • #10 / Mar 23, 2012 4:39pm

    Federacafe

    11 posts

    hi Shane, Dan, Sean
    I find this page that describe mi problem and his solution but i don’t have idea which is the posible php file.

    http://stackoverflow.com/questions/4749011/problem-with-whitespace-before-doctype

  • #11 / Mar 23, 2012 5:51pm

    Dan Decker

    7338 posts

    Hi Federacafe,

    I appreciate you trying to find a solution! However, I’m fairly confident that is not going to be the problem here. ExpressionEngine is written with practices that ensure there won’t be any whitespace, etc. at the end of our files.

    Can I get you to create an entirely separate and basic template for a test? On the site that is inserting the spaces, use just this in a new template:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html lang="en">
      <head>
        <meta charset="UTF-8">
        <title>Untitled</title>
      </head>
      
      <body>
       TEST
      </body>
    </html>

    Please let me know the result of that.

    Cheers,

  • #12 / Mar 23, 2012 6:35pm

    Federacafe

    11 posts

    Hi Dan, the whitespaces are on the first line
    you can see the source code in http://narino.cafedecolombia.com/jorge

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html lang="en">
      <head>
        <meta charset="UTF-8">
        <title>Untitled</title>
      </head>
      
      <body>
       TEST
      </body>
    
    </html>
  • #13 / Mar 27, 2012 1:18pm

    Shane Eckert

    7174 posts

    Hello Federacafe,

    Please be on the lookout for an email.

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases