AJAX handler problems with the Gin admin theme

Created on 11 April 2025, about 1 month ago

Problem/Motivation

With the Process / Build form event, when using AJAX handler with the Gin admin theme, the node is saved as unpublished.

Steps to reproduce

1. Set up a simple Process form or Build form event for an Article content type.
2. Add an AJAX handler
3. I'm using a boolean type field (field_override) which, when clicked (value is On / 1), is supposed to set form field access to "No" on another field (field_tags).
4. After invoking the AJAX handler (click on the boolean field), save the article node.
5. If the admin theme used is Gin, the node is saved as unpublished.

6. This process works as expected with the Claro theme (node is saved as published).

ECA simple data model attached.

Proposed resolution

I presuppose that this is related to Gin theme, not sure if ECA can deal with this problem. I have found this Gin-related issue 🐛 eca_form: Ajax using limited validation errors leads to faulty reads of submission values Fixed , but in a different context.

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

🇮🇪Ireland marksmith

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

Comments & Activities

  • Issue created by @marksmith
  • 🇩🇪Germany jurgenhaas Gottmadingen

    We have seen issues like that before in Gin, I suppose it's more of a Gin issue, though. But I need to do some more research before I can be certain.

  • 🇮🇳India prabha1997

    I have checked this issue — it works as expected in the Claro theme. However, the issue only occurs when using the Gin theme.

  • 🇩🇪Germany jurgenhaas Gottmadingen

    Confirmed, this can be reproduced, and it's an issue with the sticky action items in Gin, which is why I'm moving it over there.

    The problem is that not only action buttons go into the sticky bar, but also the status field. Now, if the entity form has an ajax handler in one of the fields, the form gets rebuilt. This updates all the action buttons but not the status field, and potentially others that went into the sticky bar. That's why the value of that field is then submitted as empty, and for a boolean field this is the equivalent to FALSE.

Production build 0.71.5 2024