Questions tagged [symfony-routing]

Routing in Symfony Framework's MVC implementation. Symfony is a free, open source PHP web application framework, and it is released under the MIT license.

symfony-routing is a tag suitable for any questions regarding routing in Symfony's MVC implementation, url handling, or any other matter affecting or affected by routing in Symfony.

196 questions
5
votes
2 answers

Using ParamConverter from a $_POST request (not from URL)

Is it possible tu use the @ParamConverter annotation in Symfony2 to convert a parameter send via the $_POST request into an Entity? All examples given in the symfony2 documentation convert entities from parameter defined in the route. Setting…
Seb33300
  • 7,464
  • 2
  • 40
  • 57
5
votes
4 answers

Symfony 3 Redirect All Routes To Current Locale Version

I am working on a symfony application where my goal is no matter what page the user is on it will navigate to the locale version of the page. For example, if the user navigates to "/" the home page, it will redirect to "/en/" If they are on "/admin"…
Joseph Astrahan
  • 8,659
  • 12
  • 83
  • 154
5
votes
2 answers

Same bundle different routes

I need to have different routes pointing to the same bundle. Ex: /mkt/contacts and /crm/contacts should pointing to the same contact bundle. Why? I am developing a platform (one symfony2 project), that have many applications (A marketing…
brpaz
  • 3,618
  • 9
  • 48
  • 75
4
votes
2 answers

Routing exception after upgrading to TYPO3 v9.5.14

After upgrading to TYPO3 v9.5.14 our detail pages for news crash with the exception Symfony\Component\Routing\Exception\InvalidParameterException Parameter "p88bd715a41119d0e8087a5d19cb049" for route "tx_news_pi1_1" must match "[^/]++" ("" given)…
M Klein
  • 553
  • 2
  • 10
4
votes
2 answers

Symfony default locale without specifying in URL

I would like to configure the Symfony locale options so that I can successfully access the following routes: /route /{locale}/route Currently, I can access /{locale}/route and I get my view, however, /route returns a No route found for "GET…
Peppermintology
  • 9,343
  • 3
  • 27
  • 51
4
votes
1 answer

How to tell symfony to load my custom routing.yml configuration

I'm trying to achieve this http://symfony.com/doc/current/cookbook/routing/custom_route_loader.html#more-advanced-loaders I need the bundle routing to automatically activate itself when the bundle is registered so I created this file into the path…
user3531149
  • 1,519
  • 3
  • 30
  • 48
4
votes
2 answers

Error: "No route found for "GET /web/app_dev.php""

I have created a bundle using the command php app/console generate:bundle this add the bundle in /app/AppKernel.php and also in /app/config/routing.yml. If I try to access the URL http://devserver/web/app_dev.php/bank_homepage I got a 404 error. I…
Reynier
  • 2,420
  • 11
  • 51
  • 91
3
votes
1 answer

Class "1\HomeController" does not exist

I'm learning from scrach Symfony the version 5.0.1. I created a project with the --full option. The Annotations package is already installed. Here is my error : Class "1\HomeController" does not exist in…
Keys_fh
  • 43
  • 5
3
votes
1 answer

Symfony routing, separate route setup and ignore _locale prefix?

I have in my annotations.yaml following setup to use annotation route setup: controllers: resource: '../../src/Controller/' type: annotation prefix: en: '' sr: '/es' de: '/fr' kernel: resource:…
samius polis
  • 379
  • 5
  • 17
3
votes
1 answer

Migrating legacy project to Symfony routing issues

I'm trying to start migrating my legacy project to Symfony, piece by piece (Strangler Application). I followed this documentation, but I can only load my home URL / of my legacy application. Other URL's will give me a 404 even before I get to the…
Timo002
  • 3,138
  • 4
  • 40
  • 65
3
votes
1 answer

Symfony 4.3 Routing issue - every route matched with urlRedirectAction

I'm in the process of upgrading Symfony from 3.4 to 4.3 and I have a situation in which every route is matched with controller and method correctly, but then the request reaches RedirectableCompiledUrlMatcher and replaces correct parameters…
domagoj
  • 906
  • 1
  • 8
  • 20
3
votes
2 answers

Ignore the presence or absence of a trailing slash in Symfony Routing

I'm working on a Symfony 4.1.0 based microservice and it's got the following REST API defined in config/routes.yaml: import: path: /sip/calls/ controller: App\Controller\ApiController::import methods: [POST] The problem is that a POST…
super.t
  • 2,526
  • 7
  • 32
  • 51
3
votes
0 answers

Symfony locale on homepage issue

my website url's should be: http://www.example.com/nl http://www.example.com/en I set it this way in my config/routes.yml homepage: resource: '@ProjectBaseBundle/Resources/config/routing.yml' prefix: /{_locale} The issue persist when i…
Mookum
  • 33
  • 7
3
votes
4 answers

Symfony 4 global route prefix

I can't find any info about the global route prefix in a Symfony 4 application. The only thing I've found is annotating the controllers with @route. But I don't use annotations and I need all the controllers to have the same prefix. Now I could do…
super.t
  • 2,526
  • 7
  • 32
  • 51
3
votes
1 answer

Symfony4 - 404 with routes of vendors bundles

I am testing Symfony 4 in a docker container. The default symfony app works well, but I have some issues with routing I have installed profiler and easyAdmin, but it seems routing of those bundles are note working in my case. However, when the…
MatMouth
  • 858
  • 2
  • 7
  • 24
1
2
3
13 14