- Issue created by @dejan0
- Status changed to Needs review
5 months ago 12:31pm 1 July 2024
The drupal/webform_double_opt_in module is currently causing an error, which makes it impossible to use the drupal/email_confirmer module without the webform context.
The error:
```
TypeError: Drupal\webform_double_opt_in\Event\OptedInEvent::__construct(): Argument #1 ($webformId) must be of type string, null given, called in /var/www/html/web/modules/contrib/webform_double_opt_in/webform_double_opt_in.module on line 36 in Drupal\webform_double_opt_in\Event\OptedInEvent->__construct() (line 63 of modules/contrib/webform_double_opt_in/src/Event/OptedInEvent.php).
```
I have a custom email_confirmer integration using \Drupal::service('email_confirmer')->confirm('somemail@example.com'); that triggers on node insert. This implementation is unrelated to webform. However, the webform_double_opt_in module triggers an error when webform_* properties are missing in the confirmation object.
I need to keep the drupal/webform_double_opt_in module enabled for another feature.
Improve checks in hook_confirmer($op, $confirmation) so that webform_double_opt_in functionality is executed only when it's in a webform context.
Needs review
2.0
Code