Checkboxes value not updated

Created on 17 February 2024, 9 months ago
Updated 5 April 2024, 7 months ago

Problem/Motivation

I use webform to update the existing node content. One field is checkboxes in webform and list field with multiple selections in content.
All other fields are updated successfully except the checkboxes. Both fields have the same value and text.

Steps to reproduce

If I choose the field name from the drop down directly, the node content will display as "array" but actually no selections were made; if I choose custom value of [webform_submission:values:attention], [webform_submission:values:attention:value] or [webform_submission:values:attention:checked:option_value], the node display will have the value text displayed, but actually no selection is made.

Once error message seems indicating some issues here:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '54892' for key 'PRIMARY': INSERT INTO "node" ("nid", "vid", "type", "uuid", "langcode") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4); Array ( [:db_insert_placeholder_0] => 54892 [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => visit [:db_insert_placeholder_3] => e274cdd7-0257-4dee-965e-fd44fd2ce3f7 [:db_insert_placeholder_4] => en )

Even if I only select one value, still the same error.

Did I configure this field wrong? Should I do it differently? Any advice?

Thank you in advance!

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: cannot reproduce

Version

6.2

Component

Code

Created by

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

Comments & Activities

  • Issue created by @sdsc
  • Just realized that this is an issue for Webform, not webform content creator, so I changed this issue to webform.

  • Please provide the YAML of a minimal example form.

  • this is part of the field:

    attention:
    '#type': checkboxes
    '#title': attention
    '#title_display': invisible
    '#options':
    1: 'selection 1'
    10: 'selection 10'
    11: 'selection 11'
    12: 'selection 12'
    '#states':
    visible:
    ':input[name="take_action"]':
    value: '10'
    '#default_value':
    - '[webform_submission:source-entity:field_attention:value]'

  • Status changed to Postponed: needs info 9 months ago
  • A complete form with just the necessary fields would be more helpful.

  • Status changed to Closed: cannot reproduce 7 months ago
  • πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY

    This seems to be related to using tokens but we are unable to replicate the issue

  • Could you advice:
    1. what token should be for getting checkboxes' value (multiple value) from parent node's?
    2. when updating or creating a node after the webform is submitted, directly using field mapping to pass multiple values' checkboxes doesn't work. what token should I use?

Production build 0.71.5 2024