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

Unable to generate url for route sylius_shop_product_show when product slug contains slash #16115

Open
notFloran opened this issue Apr 11, 2024 · 1 comment

Comments

@notFloran
Copy link

Sylius version affected: 1.12.14

Description

The product form allows setting a slug with a slash, but when I save the product, I get the following error :

An exception has been thrown during the rendering of a template ("Parameter "slug" for route "sylius_shop_product_show" must match "[^/]++" ("my-product/with-slash" given) to generate a corresponding URL.").

The feature features/sylius/product/managing_products/adding_product.feature contains two scenarios with a slash in slug but it doesn't fail because the "view in shop" button is inactive.

Steps to reproduce

Create an enabled product with a slug that contains a slash.

Possible Solution

Forbid slash in slug ?

@Rafikooo
Copy link
Contributor

Hello @notFloran , your proposal is valid. However, due to conflicting priorities, we will consider implementing the solution for your proposal later. However, if you'd like to try your hand at proposing the solution, it would be helpful. 🕺

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