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

Do not try to find a route for show and edit #7130

Merged
merged 2 commits into from Apr 28, 2021

Conversation

VincentLanglet
Copy link
Member

Subject

Bugfix

Changelog

### Fixed
- Fix `display_url.html.twig` template

@VincentLanglet VincentLanglet requested a review from a team April 28, 2021 08:54
@greg0ire
Copy link
Contributor

Do not try to find a route for show and edit

In what context and why not? To be squash merged or squashed by yourself if you add an explanation to your commit message.

There is often a default value `show` or `edit` in the `route.name` value
of the field description. So when displaying a type URL template, the route
must not be use for these values.
@VincentLanglet
Copy link
Member Author

Is it better @greg0ire ?

@greg0ire
Copy link
Contributor

I am not sure I understood. Apparently, when route.name is either edit or show, then value is already a url (the desired result), and there is no need to generate a url since it is already generated somewhere. Is that correct?

If yes, why is that the case, and if it is "often" the case, what if it isn't? Won't something bad happen?

@VincentLanglet
Copy link
Member Author

VincentLanglet commented Apr 28, 2021

The fieldDescription has route.name = show by default and this is not a real route name so it should not be use.

I removed this by error: https://github.com/sonata-project/SonataAdminBundle/pull/7110/files#diff-e1fdc2978b0fa84945b3a7a0ae961af58284fc541c145132679c94a128044305L8

@greg0ire
Copy link
Contributor

Oh OK I think I get it now!

@greg0ire greg0ire merged commit d471f78 into sonata-project:3.x Apr 28, 2021
@greg0ire
Copy link
Contributor

Thanks @VincentLanglet !

@VincentLanglet VincentLanglet deleted the fixDisplayUrl branch April 28, 2021 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants