2

I really need your help with this. I don't know what I've done to break the Symfony 2 toolbar. The debug tool bars stop showing and when I look at the source code of the page, I can see something like this:

<!DOCTYPE html>
<html>
<head></head>
<body>
<h1>hello</h1>
<div id="sfwdt  

and then the page terminates. This page I set up for debugging use the simplest HTML layout without using any variable and is not behind a firewall. I simply want to get the debugger toolbar showing. It looks like the debugger did try to load but for some reason it teminate at:

<div id="sfwdt

and breaks the entire page. If I turn the debugger off, the ending tag of the body and html come back.

I've searched for the occurrence of 'sfwdt' and it looks like it is from one of the twig templates of the profiler, however, when I modify that template to try things out, nothing change. Any one can point me to the right direction what's going wrong ?

And there's no error message found. I've comment out all services and keep it to the minimum, still no luck.

AppBundle/Resources/views/layout2.html.twig

<!DOCTYPE html>
<html>
<head></head>
<body>
<h1>hello</h1>
</body>
</html>

AppBundle/Resources/views/Default/index.html.twig

{% extends "AppBundle::layout2.html.twig" %}
3
  • can you add the code for your template and layout ... there must be some HTML problem on one of them - the toolbar is injected into the response Commented Jun 11, 2013 at 7:28
  • Hi, thanks, I've update the question to include the layout the template. I don't think they help though. I've spent 4 hours on this and still scratching my head. I've tried reinstall the vendor folder without luck. Commented Jun 11, 2013 at 7:51
  • are there no errors in either the web browser console or the dev.log file ? Commented Jun 11, 2013 at 7:57

1 Answer 1

3

Sorry, I finally found the issue.

One of the custom bundles registers the kernel.response event and try adding a content-length header to the response. The content-length does not take into account the extra code for the debugger bar and it trims out the extra content added for the debugger toolbar !! and it explains why the page always terminates at <div id="sfwdt, because it takes the same number characters as body and html end tags

Sign up to request clarification or add additional context in comments.

1 Comment

Nice founding. If this solves your issue you should accept your answer. Maybe it will help others :) You could also notify the bundle's author of the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.