Not working with Drupal 10.4.x / Webform 6.2.9

Created on 6 March 2025, 2 months ago

I just installed the module and tried to update a webform element to use encryption, but I get an error when trying to save. I thought I could get around this error and modify the configuration directly based on a snippet in another webform_encrypt issue by adding these parameters to an existing element:
encrypt: true
encrypt_profile: my_encryption_profile

The configuration imports successfully, but the webform won't load. The following error was in the log:

InvalidArgumentException: "encrypt" is an invalid render array key. Value should be an array but got a boolean. in Drupal\Core\Render\Element::children() (line 97 of /code/web/core/lib/Drupal/Core/Render/Element.php).

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇺🇸United States davemaxg

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

Comments & Activities

  • Issue created by @davemaxg
  • 🇵🇱Poland piotrsmykaj

    hello @davemaxg,

    I wasn’t able to reproduce the issue. Here’s what I did:

    • Installed Drupal core 10.4.6 along with Webform 6.2.9.
    • Created a sample webform with a few fields: Checkbox, Radio, Text field
    • Installed webform_encrypt 2.0.0-alpha1 and real_aes 2.6.0.
    • Added a Key (Encryption, 256 bits, File-based) and created an Encryption profile using the AES encryption method.
    • Applied encryption to the webform fields without issues when saving.
    • Verified that the webform is displayed correctly with the fields mentioned above.

    When exporting the configuration, the webform_encrypt module adds its data under the third_party_settings section, not inside the existing element section:

    third_party_settings:
      webform_encrypt:
        element:
          field_1:
            encrypt: true
            encrypt_profile: test_encryption_profile
          field_2:
            encrypt: true
            encrypt_profile: test_encryption_profile
          field_3:
            encrypt: true
            encrypt_profile: test_encryption_profile

    I am closing the issue, but feel free to reopen it and provide steps to reproduce the issue.

Production build 0.71.5 2024