Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't handle two different aliases with same route endpoint #25

Open
n0nag0n opened this issue Aug 14, 2021 · 2 comments
Open

Can't handle two different aliases with same route endpoint #25

n0nag0n opened this issue Aug 14, 2021 · 2 comments

Comments

@n0nag0n
Copy link

n0nag0n commented Aug 14, 2021

Hey there,

Just was messing with this today and I had 2 routes that pointed to the same endpoint, but had different aliases. Multilang was not a fan haha.

GET @companies: /companies = Company->indexAction ; routes to /en/companies
GET @companies_create: /companies/create = Company->createAction; routes to /en/companies/create
POST @companies_handle_create: /companies/create = Company->handleCreateAction; ERROR routes to /companies/create

Without doing a ton of digging, I'm better the problem lies in the rewrite() method in Multilang. Don't know if this is a feature or a bug, please advise 😄

@ikkez
Copy link

ikkez commented Aug 18, 2021

As far as I know, you cannot give the same route /companies/create two different named aliases via their request type (GET|POST)

@n0nag0n
Copy link
Author

n0nag0n commented Aug 19, 2021

I'll have to try that in a bit and see. I know this works, but not sure about if you throw aliases in front of it.

GET /users/create = User_Controller->createAction
POST /users/create = User_Controller->create

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants