Skip to content

Fix BlogAdminController route token for MoveAllBlogPostsAsync#25408

Merged
enisn merged 1 commit into
rel-10.4from
fix/22300-blog-admin-move-route
May 12, 2026
Merged

Fix BlogAdminController route token for MoveAllBlogPostsAsync#25408
enisn merged 1 commit into
rel-10.4from
fix/22300-blog-admin-move-route

Conversation

@maliming

Copy link
Copy Markdown
Member

Route template used {id} while the method parameter is named blogId, so ASP.NET Core ApiExplorer emitted an orphan path parameter id. ClientProxyBase.BuildHttpProxyClientProxyContext then threw ArgumentOutOfRangeException when deleting a blog from the MVC admin page (tiered).

Aligned the route token with the method parameter ({blogId}) and regenerated the affected entry in cms-kit-admin-generate-proxy.json. No application service contract changes.

Closes volosoft/volo#22300

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.
@maliming maliming requested review from Copilot and enisn May 12, 2026 06:45
@maliming maliming added this to the 10.4-final milestone May 12, 2026
@enisn enisn merged commit b65dff7 into rel-10.4 May 12, 2026
5 checks passed
@enisn enisn deleted the fix/22300-blog-admin-move-route branch May 12, 2026 06:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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} for MoveAllBlogPostsAsync.
  • Regenerated the affected client proxy metadata entry so the path parameter is correctly represented as blogId (and no orphan id parameter 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

codecov Bot commented May 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.32%. Comparing base (33157ec) to head (a7c0826).
⚠️ Report is 9 commits behind head on rel-10.4.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

3 participants