Skip to content

Replace ajaxSubmit with abp.ajax in CmsKit Pages and BlogPosts#25238

Merged
enisn merged 2 commits into
rel-10.2from
fix/cms-kit-replace-ajaxSubmit
Apr 13, 2026
Merged

Replace ajaxSubmit with abp.ajax in CmsKit Pages and BlogPosts#25238
enisn merged 2 commits into
rel-10.2from
fix/cms-kit-replace-ajaxSubmit

Conversation

@maliming

Copy link
Copy Markdown
Member

The jquery-form package was removed in #24703, but CmsKit's Pages and BlogPosts JS files still used ajaxSubmit(), causing TypeError: n.ajaxSubmit is not a function.

Replace all ajaxSubmit() calls with abp.ajax() + FormData in 4 files:

  • Pages/create.js
  • Pages/update.js
  • BlogPosts/create.js
  • BlogPosts/update.js

Fixes https://abp.io/support/questions/10584

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

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() with abp.ajax({ data: new FormData(form), processData: false, contentType: false }) in Pages create/update scripts.
  • Replaced ajaxSubmit() with abp.ajax() in BlogPosts create/update scripts while preserving the existing post-save flow (tags / redirects).
  • Centralized busy clearing for Pages via .always(...) on the abp.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.

Comment thread modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/create.js Outdated
Comment thread modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/update.js Outdated

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@enisn enisn merged commit 0305650 into rel-10.2 Apr 13, 2026
6 checks passed
@enisn enisn deleted the fix/cms-kit-replace-ajaxSubmit branch April 13, 2026 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants