-
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
Fix lost ReturnUrl param after changing localization #16325
Fix lost ReturnUrl param after changing localization #16325
Conversation
Thank you for submitting your first pull request, awesome! 🚀 If you haven't already, please take a moment to review our contribution guide. This guide provides helpful information to ensure your contribution aligns with our standards. A core team member will review your pull request. If you like Orchard Core, please star our repo and join our community channels. |
Related Issue: #16267 |
|
||
if(!string.IsNullOrEmpty(returnUrl)) | ||
{ | ||
TempData["returnUrl"] = returnUrl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be part of the redirect url instead? added as an argument in the route.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I I simplified returnUrl implementation
commit: 771d500
@@ -425,6 +425,11 @@ public async Task<IActionResult> Edit(string contentItemId) | |||
|
|||
var model = await _contentItemDisplayManager.BuildEditorAsync(contentItem, this, false); | |||
|
|||
if(!string.IsNullOrEmpty(returnUrl)) | |||
{ | |||
TempData["returnUrl"] = returnUrl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's for the View only then ViewData is better. I am worried that you are using TempData but we never had to use it before to support return urls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I I simplified returnUrl implementation
commit: 771d500
@maksim-markin please accept CLA |
@dotnet-policy-service agree |
@maksim-markin please react to the Seb comments |
...Core.Modules/OrchardCore.ContentLocalization/Views/LocalizationPart.SummaryAdminLinks.cshtml
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Contents/Views/Admin/Edit.cshtml
Outdated
Show resolved
Hide resolved
@sebastienros do you have any feedback on this or shall I merge? |
@sebastienros, @hishamco what about merge? |
Congratulations on your first PR merge! 🎉 Thank you for your contribution! We're looking forward to welcoming other contributions of yours in the future. @all-contributors please add @maksim-markin for code. If you like Orchard Core, please star our repo and join our community channels. |
@github-actions[bot] I couldn't determine any contributions to add, did you specify any contributions? I've put up a pull request to add @maksim-markin! 🎉 |
Fixes #16267