Incorrect match of element by id/name

Created on 14 September 2024, 3 months ago

Problem/Motivation

The JS code that looks up the element with parameters for Ajax calls uses prefix matching in selector (i.e. ^=) without any element type. This can cause problems if the same prefix is used for multiple elements, especially since some of them might not be form input elements.

Steps to reproduce

1. Setup an entity form with proc
2. Inside the form (e.g. via theme and/or code) make sure you have something like
```

```
3. Configure proc to use that input by name or ID for selecting the Ajax parameters (i.e. use "params-ajax" in "Identifier of form elements to be used as parameters for the endpoint" widget setting)
4. Test the functionality. You will notice that the Ajax call is sent with parameter undefined. This is because code selects the wrapper div instead of the input form, and tries to read its value attribute.

Proposed resolution

Include a tag type in the selector.

Remaining tasks

None

User interface changes

None

API changes

None

Data model changes

None

🐛 Bug report
Status

Active

Version

10.1

Component

Documentation

Created by

🇷🇴Romania abautu

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

Comments & Activities

Production build 0.71.5 2024