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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:13:35+00:00 2026-06-07T15:13:35+00:00

Looking through the Symfony documentation, I found a way to secure a form with

  • 0

Looking through the Symfony documentation, I found a way to secure a form with a “token” field. I’m trying to implement that and the form generates a token but it doesn’t pass it in the URL to the “showSuccess.php” page so it’s now displaying my _admin.php partial.

I thought it had to do with the routing but I have the routing the same as they do and it still doesn’t work.

car:
  class: sfDoctrineRouteCollection
  options: { model: car, column: token }
  requirements: { token: \w+ }

car_show:
  url: /car/:iditem.:sf_format
  class: sfDoctrineRoute
  options: { model: car, type: object }
  param: { module: car, action: show, sf_format: html }
  requirements: { iditem: \d+, sf_method: get }

Now the form itself requires the token field in the URL, but when I submit the form it’s supposed to pass a “tokenized URL” to the success page so that a partial can be displayed, but the URL defaults to the “iditem” field instead of the “token” field so my partial doesn’t render.

I found that if I change the name of the second route to something else (or delete it), then the tokenized URLs work. But then the regular URL doesn’t.

Is this something I need to change in the class files?

Here is my reference. Symfony Documentation

  • 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-07T15:13:36+00:00Added an answer on June 7, 2026 at 3:13 pm

    I actually figured it out. The “sfDoctrineCollection” for the first set of routes was creating a “car_show” route so the one that I put in there was overwriting it. All I did was change the name of the second route to something different and it worked.

    car:
      class: sfDoctrineRouteCollection
      options: { model: car, column: token }
      requirements: { token: \w+ }
    
    car_show_id:
      url: /car/:iditem.:sf_format
      class: sfDoctrineRoute
      options: { model: car, type: object }
      param: { module: car, action: show, sf_format: html }
      requirements: { iditem: \d+, sf_method: get }
    

    I just had to update all references to the old route in all of my links.

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

Sidebar

Related Questions

Looking through the documentation for CFDataRef I can't see anything that will compress a
Looking through the documentation , it seems that the new advanced gestures API doesn't
While looking through the log4j documentation I noticed that a database could be a
Looking through my database tables, I'm seeing that the created field is invariably being
Looking through the git-config variables and git-pull documentation I don't see a way to
Looking through a few SQL implementations, I noticed that most DBMSs support defining an
When looking through the documentation for SFML, I noticed the ability to rotate a
Looking through the achievement list for Visual Studio 2010, it says that there is
Looking through a Window based application ive used to experiment with as a way
Looking through the Scala 2.8 Predef class, I find that there is a method

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.