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

Fix lost ReturnUrl param after changing localization #16325

Merged
merged 6 commits into from
Jul 16, 2024

Conversation

maksim-markin
Copy link
Contributor

@maksim-markin maksim-markin commented Jun 14, 2024

Fixes #16267

Copy link
Contributor

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.

@maksim-markin
Copy link
Contributor Author

Related Issue: #16267


if(!string.IsNullOrEmpty(returnUrl))
{
TempData["returnUrl"] = returnUrl;
Copy link
Member

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.

Copy link
Contributor Author

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;
Copy link
Member

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.

Copy link
Contributor Author

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

@hishamco
Copy link
Member

@maksim-markin please accept CLA

@MikeAlhayek MikeAlhayek changed the title [Issue-16267] Fix losted ReturnUrl param after localization changing Fix lost ReturnUrl param after changing localization Jun 22, 2024
@maksim-markin
Copy link
Contributor Author

@dotnet-policy-service agree

@hishamco
Copy link
Member

@maksim-markin please react to the Seb comments

@hishamco
Copy link
Member

@sebastienros do you have any feedback on this or shall I merge?

@maksim-markin
Copy link
Contributor Author

@sebastienros, @hishamco what about merge?

@sebastienros sebastienros merged commit 0cb418c into OrchardCMS:main Jul 16, 2024
15 checks passed
Copy link
Contributor

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.

Copy link
Contributor

@github-actions[bot]

I couldn't determine any contributions to add, did you specify any contributions?
Please make sure to use valid contribution names.

I've put up a pull request to add @maksim-markin! 🎉

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

Successfully merging this pull request may close these issues.

Notification editor doesn't close when saving a draft
4 participants