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 6916403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:35:54+00:00 2026-05-27T09:35:54+00:00

I encountered a problem, have the following: DefaultController with a simple action: /** *

  • 0

I encountered a problem, have the following:

DefaultController with a simple action:

/**
 * @Route("/register")
 * @Template
 */
public function indexAction() {
    $oForm = $this->createForm(new RegisterType());
    return array(
        'form'  => $oForm->createView()
    );
}

In my twig template I try to use:

<form action="{{ path('register') }}" method="post"></form>

But I get the following error:

An exception has been thrown during the rendering of a template ("Route "register" does not exist.") in EBTSCustomerBundle:Default:index.html.twig at line 2.

When I explicitely define a “register” route in app/config/routing.yml:

register:
  pattern:  /register
  defaults: { _controller: EBTSCustomerBundle:Controller:Default:index }

Then it works fine. Can’t find any reasonable docs about it, I thought that routes defined via annotations should be visible in the whole application.

Any ideas guys?

  • 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-05-27T09:35:55+00:00Added an answer on May 27, 2026 at 9:35 am

    Routes by annotations still need to be imported into routing.yml as so:

    AcmeHelloBundle:
      resource: "@AcmeHelloBundle/Controller"
      type: annotation
    

    This will tell the routing to scan the Controller directory of the Acme\HelloBundle and import all routes.

    You can find more information about routing with annotations here. That link will also tell you how to activate routes as I have shown above.

    Also, I noticed that your route annotation needs the name parameter to be accessible through register using the path function otherwise it’d be accessed through acme_bundlename_controllername_actionname:

    @Route("/register", name="register")
    

    Hope that helps!

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

Sidebar

Related Questions

Has anyone encountered the following problem: I have IIS7 running on my computer. On
I have the following problem that other people must have encountered. I am working
I'm learning C# and I encountered the following problem. I have two classes: base
I'm new to PHP, HTML and MySQL, and have encountered the following problem: I
I've encountered a problem. I have a code which should read the following text
I'm diving into EMF now, and have encountered the following problem: I'm trying to
The following diagram illustrates a problem I have encountered creating a Manhattan diagram: Overlapping
I have been doing some JavaScript development and I encountered this problem. Consider the
I use VS2010 and I have encountered following problem: HWND handle = NULL; handle
I am developing a silverlight navigation application and have encountered the following problem. I

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.