-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
LinkGenerator does not take in consederation the site prefix #16259
Comments
Latest |
Yes |
I think this is a limitation of the extension method used. If you look at the implementation, it does not use the HttpContext when generating the URL The problem with that for us is that the URL-prefix will never be considered here since this is something we add to the HttpContext. The workaround is to use the extension method that accepts the HttpContext as the first argument. So instead of doing this
do this
|
So there is no issue, right? We just need to call the extension method with the HttpContext when using LinkGenerator. Please re-open if I missunderstood. |
Describe the bug
This is something that require investigation. When when using LinkGenerator to create a link for a tenant that use "prefix" for the host. It generates a path without the /tenant-prefix.
like this for example:
If you have a tenant setup with no host but with
blog1
prefix. then creating a link like thisvar url = _linkGenerator.GetPathByAction("Index", "Admin", new { area = "OrchardCore.Settings", groupId = "admin" });
creates
instead of
Orchard Core version
Expected behavior
I expect the generated URL to be as follow
The text was updated successfully, but these errors were encountered: