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

Problem with custom translatable model redirection #4

Open
cchapleau opened this issue Jun 6, 2024 · 1 comment
Open

Problem with custom translatable model redirection #4

cchapleau opened this issue Jun 6, 2024 · 1 comment

Comments

@cchapleau
Copy link

Hi,

I'm on :
- Sylius 1.12.16
- Symfony 6.4.8
- PHP 8.2.18

With a custom translatable model, I have troubles with the redirection in the show part.

Here is an example to explain it :

from .../fr/actualite to .../en/actutality :

app_front_actuality_index:
    path:
        fr: /{_locale}/actualite
        en: /{_locale}/actuality
    methods: [GET]
    defaults:
        _controller: app.controller.actuality::actuality_index

from .../fr/actualite/mon-premier-article to .../en/actuality/my-first-article :

app_front_actuality_show:
    path:
        fr: /{_locale}/actualite/{slug}
        en: /{_locale}/actuality/{slug}
    methods: [GET]
    defaults:
        _controller: app.controller.actuality::actuality_show

I notice that when debugging my route app_front_actuality_show, the alias is null.
Is it normal that it doesn't work for me or I've done something wrong with the plugin ?
Or maybe, my custom translatable model's configuration miss something ?

Thank you so much in advance for your reply and your help.

@cchapleau
Copy link
Author

Hi,
I see another problem.
When we have products with 2 different slug (EN + FR), the redirection failed too in :

  • sylius_shop_product_review_index
  • sylius_shop_product_review_create

Hope it will be fixed soon.

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

1 participant