ajax_html_ids (primary culprit) in large forms causes max_input_vars to be exceeded

Created on 28 July 2015, over 9 years ago
Updated 5 April 2023, almost 2 years ago

Problem/Motivation

In certain large and/or complex forms (entity) or other, which involve a number of elements etc it is sometimes the case that ajax_html_ids causes the number of variables in the ajax postback to exceed 1000 resulting in partial loss of postback data. In some scenarios this can cause the ajax postback in admin forms to fail validation of the theme / theme token resulting in additional processing being run on the form where mandated via the non-admin theme and potentially causing WSOD / calls to functions not loaded.

Proposed resolution

The core function drupal_html_id will look for the ajax_html_ids attribute of the post-back, and already has a case to validate if there is a ',' and to explode the entered string - I propose making this the standard operating procedure.

If the misc/ajax.js were to always flatten the values into a comma delimetered string, there is a very large number (in some cases) of input variables that will not be run:

Current callback:
ajax_html_ids[]=id_one
ajax_html_ids[]=id_two
ajax_html_ids[]=id_three
vs.
ajax_html_ids=id_one,id_two,id_three

πŸ› Bug report
Status

Needs review

Version

7.0 ⚰️

Component
AjaxΒ  β†’

Last updated 1 day ago

Created by

πŸ‡¬πŸ‡§United Kingdom dan.munn

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