Warning: Array to string conversion in Drupal\webform\WebformSubmissionConditionsValidator->checkConditionTrigger() (line 829 of modules/contrib/webform/src/WebformSubmissionConditionsValidator.php).

Created on 17 January 2025, 10 days ago

After updating to 1.1.4 from 1.1.2 this module doesn't work any more for me.

When trying to select a slot from a calendar (mandatory or not), no selected slot is highlighted. When checking the console, the following error occurs:

Uncaught TypeError: Cannot set properties of null (setting 'value')

See screenshots below.

I'm still able to go to the next step, though. Yet I'm being displayed the following error:

Warning: Array to string conversion in Drupal\webform\WebformSubmissionConditionsValidator->checkConditionTrigger() (line 829 of modules/contrib/webform/src/WebformSubmissionConditionsValidator.php).

I have tried dev version as well with the same result.

I have also uninstalled and reinstalled the module. Same thing.

Any help would be appreciated.

🐛 Bug report
Status

Active

Version

1.1

Component

Code

Created by

🇦🇺Australia zimny

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

Comments & Activities

  • Issue created by @zimny
  • 🇬🇧United Kingdom mylocaltrades

    Have you run update.php and cleared the cache?

  • 🇦🇺Australia zimny

    drush updb, drush cr. Yes, thank you. As I mentioned, I even uninstalled the module and tried 1.1.3, 1.1.4 and dev versions.

    The code that breaks the js functionality for me is located in webform_booking.js, line 458. Should that value be left like that, i.e . document.getElementById(`selected-slot-${elementId}`).value = '';?

    On the other hand, I'm wondering whether there might be some js library issue that I'm using, like version mismatch or something?

    Is this only me?

  • 🇵🇹Portugal rfmarcelino

    @zimmy, just installed the module on a clean Drupal 11 install and found no errors or warnings while booking a slot.
    I'm closing it for now since I can't reproduce the error.

  • 🇦🇺Australia zimny

    @rfmarcelino, it's obvious that the latest version works on a clean installation. This is not my issue here.

    I specifically indicated that this happens after updating from 1.1.2 upwards and I run it on Drupal 10.4.1. The real question is what major changes were done to your module between those versions. I know that a new requirement of webform_ui was added. What about js libraries etc.? Btw, I use the Bootstrap 3 theme, the latest version.

    At this stage for my particular project I don't need the latest bells and whistles like paypal integration. I can hack the 1.1.2 version to make it to work with my project. However some things have been changed significantly since this is happening for me.

    My point is that sometimes it is just not possible to start fresh. Hopefully you understand that.

    Still love your module. Thanks for all the hard work!

  • 🇵🇹Portugal rfmarcelino

    @zimny, thank you for your feedback!

    Sorry, I don't know what is causing the warning on the parent module Webform.
    From 1.1.2 there are a considerable amount of commits, but nothing changing the webform element or data structure.
    If the webform booking was the only change you've made, you can try to check out one commit at a time:
    https://git.drupalcode.org/project/webform_booking/-/commits/1.1.x?ref_t...
    ddev composer require drupal/webform_booking:dev-1.1.x#ea273124d56adea3826bb131a4936c02047758a3

    Since it's only a warning, maybe you can adjust the error level:
    https://www.drupal.org/docs/develop/development-tools/enable-verbose-err...

Production build 0.71.5 2024