title: MissingMandatoryParametersException: Some mandatory parameters are missingto generate a URL for route
body: <p>It seems that I am missing something here and I am keep getting the following message:</p>
  
  <p>## An exception has been thrown during the rendering of a template ("Some mandatory parameters are missing ("fooId") to generate a URL for route "foo_edit".") in AdminFooBundle:Default:base.html.twig at line 1. ##</p>
  
  <p>This is the Controller's action:</p>
  
  <pre><code>/**
   * @Route("/{fooId}/edit", name="foo_edit", requirements={"fooId" = "\d+"})
   * @param $fooId
   *
   * @return View
   */
  public function editFooFormAction($fooId)
  {
      $foo = $this-&gt;getFooRepository()-&gt;findOneBy(['fooId' =&gt; $fooId]);
  
      return $this-&gt;render(
          "AdminFooBundle:Competition:show_foo.html.twig",
          ['foo' =&gt; $foo]
      );
  }
  </code></pre>
  
  <p>And this is my twig file:</p>
  
  <pre><code>{% extends 'FooAdminToolBundle:Default:base.html.twig' %}
  
  {% block inner_main %}
  {{ parent() }}
  
  &lt;form data-spy="scroll" data-target="#affix-nav" action="{{ path('foo_create') }}" method="post"&gt;
      &lt;button type="submit" style="position: absolute; left:-10000px;"&gt;&lt;/button&gt;
      {% include 'FooAdminBundle:Foo:foo_data.html.twig'%}
      &lt;button type="submit" class="btn btn-default"&gt;Add new foo&lt;/button&gt;
  &lt;/form&gt;
  {% endblock %}
  </code></pre>
  
  <p>My guess is the issue lives in extending  Default:base.html.twig, but I cannot see something right now:</p>
  
  <pre><code>    {% set currentPath = path(app.request.attributes.get('_route')) %}
  &lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
          &lt;title&gt;    {% block title %}Admin Tool{% endblock %}&lt;/title&gt;
  
      {% block stylesheets %}
          &lt;link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"&gt;
          &lt;link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css"&gt;
      {% endblock %}
  
      {% block headcss %}
      {% endblock %}
  
      {% block headjavascripts %}
      {% endblock %}
  
      &lt;link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" /&gt;
  &lt;/head&gt;
  &lt;body data-spy="scroll" data-target="#affix-nav"&gt;
  
      {% include 'FooAdminBundle:Default:navbar.html.twig' %}
  
      &lt;div class="container"&gt;
  
          {% block main %}{% endblock %}
  
          &lt;div class="row"&gt;
              &lt;div class="col-sm-9"&gt;
                  {% block inner_main %}{% endblock %}
              &lt;/div&gt;
              &lt;div class="col-sm-3"&gt;
                  &lt;div id="options" data-spy="affix"&gt;&lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
      &lt;/div&gt; &lt;!-- /main --&gt; 
  </code></pre>