Skip to content

Fix admin redirects with conventional site routing - #15

Open
MortenFriisSiteImprove wants to merge 1 commit into
mainfrom
fix/admin-settings-redirect
Open

MortenFriisSiteImprove wants to merge 1 commit into
mainfrom
fix/admin-settings-redirect

Conversation

@MortenFriisSiteImprove

Copy link
Copy Markdown
Contributor

Saving plugin settings can redirect to /SiteimproveAdmin/Index when the host registers a conventional {controller}/{action}/{id?} route, leading to a 404 outside the protected module.

Resolve the admin URL through IModuleResourceResolver for settings save and both prepublish configuration outcomes. Preserve prepublishError=true when enablement fails.

Related to #10. Keep the issue open until the containing package is published and its version is confirmed.

Validation:

  • All 64 backend cases pass on each of .NET 6 and .NET 8.
  • Eight HTTP regression cases cover save and prepublish enabled, disabled, and failure outcomes with and without a conventional route, using a custom module prefix. Five cases failed on each target before the fix and all pass afterward.
  • Existing settings-persistence and authorization assertions pass.
  • Tests use ASP.NET TestServer and a mocked module resolver; a live Optimizely CMS smoke test remains before release.

@MortenFriisSiteImprove
MortenFriisSiteImprove requested a review from a team as a code owner September 15, 2026 11:56
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.

1 participant