skip to Main Content

The debug bar is not showing at the bottom of the website:

This is my base.html.twig

<!DOCTYPE html>
<html class="no-js" lang="fr">
<head><meta name="google-site-verification" content="8ftgUdHWfZa5ANhU7DJxSpGof4khdKGz5X0phHaWa64" />
<title>{% block title %}{% endblock %}</title><meta name="description" content="Location en ligne de vêtements et accessoires de luxe entre particuliers : robes, costumes, sacs, vestes - Assurance incluse - Authenticité 100% garantie."><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1" /><link rel="shortcut icon" href="{{ asset('bundles/frontoffice/images/faviconii.png') }}"><link rel="apple-touch-icon" href="{{ asset('bundles/frontoffice/images/apple-touch-icon-57x57.png') }}"><link rel="apple-touch-icon" sizes="72x72" href="{{ asset('bundles/frontoffice/images/apple-touch-icon-72x72.png') }}"><link rel="apple-touch-icon" sizes="114x114" href="{{ asset('bundles/frontoffice/images/apple-touch-icon-114x114.png') }}">
{% block stylesheets  %}  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css"><link rel="stylesheet" href="{{ asset('/css/generalstyle.css') }}" type="text/css" />
{% endblock %}
{% javascripts '@ADFrontBundle/Resources/public/js/jquery.min.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}

<script type="text/javascript">
    window.smartlook||(function(d) {
    var o=smartlook=function(){ o.api.push(arguments)},h=d.getElementsByTagName('head')[0];
    var c=d.createElement('script');o.api=new Array();c.async=true;c.type='text/javascript';
    c.charset='utf-8';c.src='//rec.smartlook.com/recorder.js';h.appendChild(c);
    })(document);
    smartlook('init', 'fec4728dc14b7eb5ae97ba5745a6fcc5763e911c');
</script>



</head>
<body>
{{ render(controller("ADFrontBundle:Default:menu")) }} 
{% block body %}{% endblock %}
{{ include("ADFrontBundle:Default:footer/pied.html.twig") }}
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
      n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
      n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
      t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
        document,'script','https://connect.facebook.net/en_US/fbevents.js');
      fbq('init', '1139325582796441');
      fbq('track', "PageView");</script><noscript><img height="1" width="1" style="display:none"
        src="https://www.facebook.com/tr?id=1139325582796441&ev=PageView&noscript=1"
        /></noscript><script type="text/javascript"> 
</script>
{% block javascript %}
<script src="https://maps.googleapis.com/maps/api/js?sensor=false&amp;libraries=places"></script><script type="text/javascript" src=" https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.2.0/js/bootstrap.min.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-hover-dropdown/2.2.1/bootstrap-hover-dropdown.min.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/jquery.magnific-popup.min.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.imagesloaded/3.1.8/imagesloaded.pkgd.min.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-smooth-scroll/1.4.10/jquery.smooth-scroll.min.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-parallax/1.1.3/jquery-parallax-min.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/owl-carousel/1.32/owl.carousel.min.js"></script>
{%  endblock %}
{% javascripts '@ADFrontBundle/Resources/public/js/skrollr.min.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% javascripts '@ADFrontBundle/Resources/public/js/wow.min.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% javascripts '@ADFrontBundle/Resources/public/js/page-scroll.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% javascripts '@ADFrontBundle/Resources/public/js/jquery.easypiechart.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% javascripts '@ADFrontBundle/Resources/public/js/jquery.isotope.min.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% javascripts '@ADFrontBundle/Resources/public/js/popup-gallery.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% javascripts '@ADFrontBundle/Resources/public/js/text-effect.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% javascripts '@ADFrontBundle/Resources/public/js/jquery.tools.min.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}     
{% javascripts '@ADFrontBundle/Resources/public/js/jquery.revolution.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% javascripts '@ADFrontBundle/Resources/public/js/counter.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% javascripts '@ADFrontBundle/Resources/public/js/jquery.fitvids.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% javascripts '@ADFrontBundle/Resources/public/js/jquery.geocomplete.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% javascripts '@ADFrontBundle/Resources/public/js/chosen.jquery.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% javascripts '@ADFrontBundle/Resources/public/js/main.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
<script type="text/javascript">
$(document).ready(function() {
$('.chosen-select').chosen();
$('.chosen-select-deselect').chosen({ allow_single_deselect: true });
$("#geocomplete").geocomplete({
details: "form",
blur: true,
geocodeAfterResult: true
});}); </script>
{% for message in app.session.flashbag.get('facebookNotValid') %}

<div id="my-modal" style="display:block;" class="modal fade in">
    <div  class="modal-dialog" style="margin-top:20%;">
        <div class="modal-content" style="width: 92%;   margin: 0 auto;">
            <div style="padding: 30px;    border: none;" class="modal-header">
                <span style="text-transform: uppercase;" class="text-center slider-subtitle5 black-text no-margin-bottom">Vérification adresse email</span> 
            </div>
            <div class="modal-facebook modal-body" style="padding: 30px; height: 174px;">
                <p  class="paragraphe-facebook" >Afin de profiter de toutes les fonctionnalités de Dressingavenue.com, veuillez renseigner une adresse email valide</p>
                <div class="email-facebook col-sm-12" style="display: block;">
                      <form method="POST" action="{{   path('valider_fb') }}">
                            <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}" / >

                          <div class="col-sm-8 col-md-8 col-xs-8 no-padding"><input type="text" name="emailFb" placeholder="Votre E-mail ..." style="text-transform:lowercase;padding: 9px;" required="" pattern="[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+.[A-Za-z]{2,3}$"></div>

                           <div class="col-sm-4 col-md-4  col-xs-4 no-padding"><button type="submit" class="highlight-button btn btn-medium button  no-margin bg-logo2 white-text no-border">Valider</button></div>
                      </form>
                </div>
            </div>
        </div>
    </div> 
</div>
<div class="modal-backdrop fade in"></div>

{% endfor %}
<script>
$( document ).ready(function() {

var close=true;
$('.display-it').click(function(){
    $('.panel-mobile-hide').slideToggle( "slow" ,function(){
      if(close){
          $('.display-it').removeClass( "fa-minus" );
          $('.display-it').addClass( "fa-plus" );
          close=false;
      }else{
         $('.display-it').removeClass( "fa-plus" );
          $('.display-it').addClass( "fa-minus" );
          close=true;
      }
    });
});

    if($('#fos_user_registration_form_tel').length){
   $('#fos_user_registration_form_tel').prop("type", "tel");
}

    if($('.telephone-input').length){
   $('.telephone-input').prop("type", "tel");
}
});
</script>

<script src='https://cdn.slaask.com/chat.js'></script>
<script>
    _slaask.init('74cfba4484b889bb6949aec78237743f');
</script>

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
    ga('create', 'UA-79582949-1', 'auto');
    ga('send', 'pageview');
</script>

{% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}

<script>
  smartlook('tag', 'email', '{{ app.user.email }}');
  smartlook('tag', 'name', '{{ app.user.prenom|title }} {{ app.user.nom|title }} ');
</script>
{% endif %}

</body></html>

This my app kernel:

if (in_array($this->getEnvironment(), array('dev', 'test'))) {
    $bundles[] = new SymfonyBundleDebugBundleDebugBundle();
    $bundles[] = new SymfonyBundleWebProfilerBundleWebProfilerBundle();
    $bundles[] = new SensioBundleDistributionBundleSensioDistributionBundle();
    $bundles[] = new SensioBundleGeneratorBundleSensioGeneratorBundle();
    $bundles[] = new CoreSphereConsoleBundleCoreSphereConsoleBundle();
}

This is my app_dev.php

<?php

use SymfonyComponentHttpFoundationRequest;
use SymfonyComponentDebugDebug;

// If you don't want to setup permissions the proper way, just uncomment the following PHP line
// read http://symfony.com/doc/current/book/installation.html#checking-symfony-application-configuration-and-setup
// for more information
//umask(0000);

// This check prevents access to debug front controllers that are deployed by accident to production servers.
// Feel free to remove this, extend it, or make something more sophisticated.

if (isset($_SERVER['HTTP_CLIENT_IP'])
    || isset($_SERVER['HTTP_X_FORWARDED_FOR'])
    || !(in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '41.250.108.226','fe80::1', '::1']) || php_sapi_name() === 'cli-server')
) {
    header('HTTP/1.0 403 Forbidden');
    exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
}

/**
 * @var ComposerAutoloadClassLoader $loader
 */
$loader = require_once __DIR__.'/../app/bootstrap.php.cache';
Debug::enable();
require_once __DIR__.'/../app/AppKernel.php';
$kernel = new AppKernel('dev', true);
$kernel->loadClassCache();
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);

3

Answers


  1. You need to have </body> on your view.
    So just put an html structure, it will work

    <html>
    <head></head>
    <body></body>
    </html>
    
    Login or Signup to reply.
  2. There may be more than one possible reasons behind this issue.

    Reason #1

    Debug mode is enabled by default in development environment and if you want to enable it you have to put below statement in app.php placed in web folder.

    Debug::enable();
    

    If you are using custom created environment than add Debug::enable(); in <Env Name>.php in web folder

    Reason #2

    If you are using development environment than make sure that Debug::enable(); is already there in app_dev.php file.

    Update #1

    Also, Pls check any JavaScript errors occur or not while loading page from browser’s console

    Login or Signup to reply.
  3. Are you accessing your route via appending app_dev.php to the URL? If so, make sure in this line:

    if (isset($_SERVER['HTTP_CLIENT_IP'])
        || isset($_SERVER['HTTP_X_FORWARDED_FOR'])
        || !(in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '41.250.108.226','fe80::1', '::1']) || php_sapi_name() === 'cli-server')
    )
    

    That in the array $_SERVER['REMOTE_ADDR'], it contains the IP address of the host that you want to use to access your server. I presume you’ve edited it and added 41.250.108.226.

    If all that is good, then you can access the debug environment and route via the debug URL. Let’s say for example you wanted to access the server via your localhost, then to see the debug bar using debug URL, you would enter this in a browser:

    http://localhost/app_dev.php

    Let us know if that works. If not, then you may have changed something in your environment.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search