A
A
AJ2013-04-10 13:12:32
PHP
AJ, 2013-04-10 13:12:32

Fight between Smarty and browser debugger

Good, people.
A question from the category “What am I doing wrong?”.
Yesterday I installed Smarty 3.1.13. Play a little, figure out what's what. Set up. Created 3 templates. I start, out of habit I climb into the debugger and see the following picture:

<html>
    <head></head>
    <body>
    "



    "
    <title>123</title>
    <!--CSS-->
    <link rel="stylesheet" href="../templates/templates/manage/css/manage.css">
    <!--Javascript-->
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    <div id="container">
  
  <section class="main_control">
    <li>Пункт 1</li>
    <li>Пункт 2</li>
    <li>Пункт 3</li>
  </section>

        <section class="monitor">
    	    <header>
                <h1>Заголовок</h1>
            </header>
            
            <article></article>
        </section>
    
    </div>
</body>
</html>


And, in fact, the code in the template:

<!DOCTYPE html>
<html>
<head>
<title>123</title>
<!--CSS-->
<link rel="stylesheet" href="../templates/templates/manage/css/manage.css" />
<!--Javascript-->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" ></script>
</head>
<body>
<div id="container">
  
  <section class="main_control">
    <li>Пункт 1</li>
    <li>Пункт 2</li>
    <li>Пункт 3</li>
  </section>

    <section class="monitor">
    	<header>
        	<h1>Заголовок</h1>
        </header>
        <article></article>
    </section>
    
</div>
</body>
</html>


The debuggers of Chrome, Mozilla and Opera swear at the code in unison. If you look at the source in the browser, then everything is semantically and hierarchically correct. But debuggers refuse to accept this as valid code.

What am I doing wrong?

PS - search yuzal, google yuzal, manual yuzal. Periodically I fight the second day. I appeal to HabrMozgu ...

Answer the question

In order to leave comments, you need to log in

6 answer(s)
A
AJ, 2013-04-19
@2ball

As a result, he spat and continued to write. A couple of days later I got into the debugger and ... everything is fine. I do not know the reasons for the miraculous changes.

A
Anton Bobylev, 2013-04-10
@dpigo

The validator swears at <li> in <section> maybe this is the case?

N
Nikita Gusakov, 2013-04-10
@hell0w0rd

Delete. Install twig

S
Stdit, 2013-04-10
@Stdit

The first thing that catches your eye is that li doesn't have ol/ul. And with the html4 version of this file (change doctype, remove section, header) the same trouble, or is everything fine?

A
AJ, 2013-04-10
@2ball

No, it's empty, I'll try now

S
Steamcards, 2015-04-26
@Steamcards

I understand that necrophilia, but suddenly someone will help.
There was a similar problem, though with a template for OpenCart.
The problem turned out to be UTF-8 control codes at the beginning of the file, Chrome does not digest them.
In Notepad++ it is solved by switching to "Encode in UTF-8 (without BOM)" mode. Or delete manually.
All good.
ps dpigo Thanks for the validator, he told me where to dig.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question