Replace ajaxSubmit with abp.ajax in CmsKit Pages and BlogPosts#25238
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates CmsKit admin UI scripts to stop using jquery-form’s ajaxSubmit() (removed in #24703) by switching to abp.ajax() with FormData, preventing TypeError: ...ajaxSubmit is not a function on Pages and BlogPosts create/update flows.
Changes:
- Replaced
ajaxSubmit()withabp.ajax({ data: new FormData(form), processData: false, contentType: false })in Pages create/update scripts. - Replaced
ajaxSubmit()withabp.ajax()in BlogPosts create/update scripts while preserving the existing post-save flow (tags / redirects). - Centralized busy clearing for Pages via
.always(...)on theabp.ajax()promise.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/create.js | Switch page create submit from ajaxSubmit() to abp.ajax() + FormData. |
| modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/update.js | Switch page update submit from ajaxSubmit() to abp.ajax() + FormData. |
| modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/create.js | Switch blog post create submit from ajaxSubmit() to abp.ajax() + FormData. |
| modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/update.js | Switch blog post update submit from ajaxSubmit() to abp.ajax() + FormData. |
enisn
approved these changes
Apr 13, 2026
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.
The
jquery-formpackage was removed in #24703, but CmsKit's Pages and BlogPosts JS files still usedajaxSubmit(), causingTypeError: n.ajaxSubmit is not a function.Replace all
ajaxSubmit()calls withabp.ajax()+FormDatain 4 files:Pages/create.jsPages/update.jsBlogPosts/create.jsBlogPosts/update.jsFixes https://abp.io/support/questions/10584