Skip to content

About

Reduces large Backdrop AJAX requests so form actions work with 128 KiB request-body limits.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

MD Compact AJAX IDs

Large Backdrop CMS forms can send a long ajax_html_ids[] list with each AJAX POST. In multipart requests, every ID adds its own field headers and boundary. On hosts with a small non-file request-body limit (often 128 KiB), an image Remove button, Select Existing button, or another AJAX form control may fail with HTTP 400 or 413 even though no large file is being uploaded.

This module sends the same complete list of IDs as one comma-separated ajax_html_ids[] value. Backdrop core's backdrop_html_id() already supports this representation. It preserves Backdrop's duplicate-ID protection while removing repeated multipart field overhead. It does not alter saved content, change PHP or firewall settings, or disable security checks.

Installation

  1. Place this directory at modules/md_compact_ajax_ids in a Backdrop 1.x site and enable MD Compact AJAX IDs at admin/modules.
  2. Clear Backdrop's cache so the new JavaScript is included.
  3. On a large edit form, retry the failing AJAX action. In the browser's Network panel, compare the POST status and Content-Length before and after enabling the module.

There are no settings. Disable the module to restore Backdrop's standard AJAX request format.

Scope and limitations

  • Applies to Backdrop AJAX requests that generate an ajax_html_ids[] list.
  • Keeps the original list if an ID contains a comma or the value is not an array, avoiding an ambiguous conversion.
  • Cannot help when the rest of the form alone exceeds the host's limit, or when a request fails for an unrelated reason. Check the server/WAF logs in those cases.
  • Does not replace a host-specific ModSecurity rule or change its policy.

For technical background, see Backdrop's backdrop_html_id() documentation and ModSecurity's SecRequestBodyNoFilesLimit documentation.

Current maintainer

Joshua McCormack — McCormackDesigns.net

Credits

Created for Backdrop CMS by Joshua McCormack. This is an original module, not a Drupal 7 port. No third-party assets are included.

License

GPL v2 or later. See LICENSE.txt.

About

Reduces large Backdrop AJAX requests so form actions work with 128 KiB request-body limits.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages