Make sending ajax_html_ids optional

Created on 9 December 2021, over 3 years ago
Updated 13 April 2024, 12 months ago

Problem/Motivation

This is another approach to solving the max_input_vars problem.

The problem: when Drupal's core ajax functionality is used, ajax.js gathers up every html id on the page and adds it as POST data to the submission. On a large and complicated page, this can result in gathering and posting thousands of variables, which a) can often exceed the PHP max_input_vars value and b) is slow and bandwidth intensive.

Existing suggestions to solve the problem involve serializing the ids so they are send as one POST input variable. But often you'd rather just not send them at all.

Proposed resolution

Edit ajax.js to make gathering and sending the html ids optional.

Remaining tasks

None.

User interface changes

None.

API changes

May need some documentation, but the setting should be optional, so nothing breaks.

Data model changes

None.

Release notes snippet

Permits developers to add a setting that prevents ajax.js from gathering and sending html ids.

Feature request
Status

Needs review

Version

7.0 ⚰️

Component
Ajax 

Last updated 1 day ago

Created by

🇺🇸United States gbirch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024