Fix BlogAdminController route token for MoveAllBlogPostsAsync#25408
Merged
Conversation
Route template used {id} but the method parameter is named blogId, so
ASP.NET Core ApiExplorer emitted an orphan path parameter id, which made
ClientProxyBase.BuildHttpProxyClientProxyContext throw
ArgumentOutOfRangeException when deleting a blog from the MVC admin page.
enisn
approved these changes
May 12, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a route-template/parameter-name mismatch in BlogAdminController.MoveAllBlogPostsAsync that caused ApiExplorer to emit an orphan {id} path parameter, which then broke tiered MVC admin blog deletion via client proxy context construction.
Changes:
- Aligned the route token from
{id}to{blogId}forMoveAllBlogPostsAsync. - Regenerated the affected client proxy metadata entry so the path parameter is correctly represented as
blogId(and no orphanidparameter is emitted).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogAdminController.cs | Updates the route template to use {blogId} to match the action parameter name and avoid ApiExplorer/proxy mismatches. |
| modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/cms-kit-admin-generate-proxy.json | Regenerates the proxy metadata for the endpoint: URL token renamed to {blogId}, binding source corrected to Path, and the orphan id parameter removed. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## rel-10.4 #25408 +/- ##
============================================
+ Coverage 49.30% 49.32% +0.02%
============================================
Files 3667 3667
Lines 123186 123186
Branches 9409 9409
============================================
+ Hits 60731 60765 +34
+ Misses 60647 60596 -51
- Partials 1808 1825 +17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Route template used
{id}while the method parameter is namedblogId, so ASP.NET Core ApiExplorer emitted an orphan path parameterid.ClientProxyBase.BuildHttpProxyClientProxyContextthen threwArgumentOutOfRangeExceptionwhen deleting a blog from the MVC admin page (tiered).Aligned the route token with the method parameter (
{blogId}) and regenerated the affected entry incms-kit-admin-generate-proxy.json. No application service contract changes.Closes volosoft/volo#22300