Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8079499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T16:07:23+00:00 2026-06-05T16:07:23+00:00

I have this configuration: A page containing a search field, at the submit in

  • 0

I have this configuration:

A page containing a search field, at the submit in the same page I want a list of every result matching the research, everyone linking to a corresponding route. For example if I find 4 elements, I want that in the resulting page 4 links Azienda1, Azienda2 ecc.

Now I get this error:

An exception has been thrown during the rendering of a template (“The “ABCAziendaBundle_visualizza_azienda” route has some missing mandatory parameters (“id_azienda”).”) in ::base.html.twig at line 27.
500 Internal Server Error – Twig_Error_Runtime
1 linked Exception:
MissingMandatoryParametersException

Here are the key files,

#config.yml
ABCAziendaBundle_visualizza_azienda:
    pattern: /visualizza_azienda/{id_azienda}
    defaults: { _controller: ABCAziendaBundle:Default:showAzienda }
    requirements:
    id_azienda: \d+

ABCAziendaBundle_azienda_index:
    pattern:  /
    defaults: { _controller: ABCAICAziendaBundle:Default:indexAzienda }

#DefaultController.php

public function indexAziendaAction(Request $request) {

    $searchFormType = new SearchAziendaType();
    $form = $this->createForm($searchFormType);

    if ($request->getMethod() == 'POST')
    {
        $form->bindRequest($request);
        if ($form->isValid())
        {
            $data = $form->getData();

            $em = $this->getDoctrine()->getEntityManager();
            $aziende = $em->getRepository('ABCAziendaBundle:Azienda')->findAziendaByAliasOrRagioneSocialeSubstring($data["search_field"]);
            return $this->render('ABCAziendaBundle:Default:indexAzienda.html.twig', array('form' => $form->createView(), 'aziende' => $aziende));
        }
    }

    return $this->render('ABCAziendaBundle:Default:indexAzienda.html.twig', array('form' => $form->createView()));
}

public function showAziendaAction($id_azienda) {

    echo "non entra qui";
}

#indexAzienda.html.twig
{% extends "::base.html.twig" %}

{% block pagetitle %}ABC{% endblock %}

{% block body %}
<h2>Ricerca azienda</h2>
<div id="form_container">
    <form action="{{ path('ABCAziendaBundle_azienda_index') }}" method="post" {{ form_enctype(form) }}>
        {{ form_label(form.search_field, "Ricerca Azienda") }}
        {{ form_widget(form.search_field) }}
            <input type="submit" />
    </form>
    <a href="{{ path('ABCAziendaBundle_registra_azienda_anagrafica') }}"><button>nuova azienda</button></a>
</div>
    {% if aziende is defined %}
        {% for azienda in aziende %}
            <div class="areaTot">
                <a href="{{ path('ABCAziendaBundle_visualizza_azienda', { 'azienda_id' : azienda.id })  }}">{{azienda.alias}}</a>
            </div>
        {% endfor %}
    {% else %}
    <div class="areaTot">
        <p>"NIENTE"</p>
    </div>
    {% endif %}
{% endblock %}

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T16:07:24+00:00Added an answer on June 5, 2026 at 4:07 pm

    I think its a typo on your side:

    <a href="{{ path('ABCAziendaBundle_visualizza_azienda', { 'azienda_id' : azienda.id })  }}">
    

    Should be:

    <a href="{{ path('ABCAziendaBundle_visualizza_azienda', { 'id_azienda' : azienda.id })  }}">
    

    The difference is the route parameter, you wrote azienda_id initialy, but the route parameter name is id_azienda

    Should clear the error.

    Regards,
    Matt

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my DefaultRegistry I have this configuration: ForRequestedType<INHUnitOfWork>().CacheBy(InstanceScope.HttpContext) .TheDefault.Is.OfConcreteType<NHibernateUnitOfWork>(); At some point in the
I am trying out GWT in this 'configuration': 1) I have written a server
So I have this code inside my lib/ folder: class GlobalConfig::SetHelper def self.yes_no_input(configuration) value
I have the layout of a configuration dialog in an XML like this: <?xml
I'm working in xmldataprovider and we have configuration value source this value may be
I have a ASP.NET 3.5 page which has a repeater containing lines of information
I have an odd problem. I have a page called search.aspx. When the search
I have a configuration page that needs to create a virtual directory under a
This could be a repeat question, I apologize. I have a jsp page in
I have a custom configuration page in my app which just so happens to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.