- Issue created by @andy inman
- 🇬🇧United Kingdom andy inman Gloucestershire, UK
Fixed in 1.1.x because we no longer access anything in the private files directory.
If the private files directory cannot be written to, e.g. because it does not exist, then warning is logged on form submission:
Warning: file_put_contents(private://webform_handler_defer_log.json): Failed to open stream: "Drupal\Core\StreamWrapper\PrivateStream::stream_open" call failed in Drupal\webform_handler_defer\Plugin\WebformHandler\WebformHandlerDefer::submissionList() (line 191 of /app/web/modules/dev/webform_handler_defer/src/Plugin/WebformHandler/WebformHandlerDefer.php)
That's reasonable - this is a site misconfiguration. But the module doesn't detect that the submission id was not recorded, meaning that deferred handlers will never be run.
1. Delete or rename the private files directory - by default sites/default/files/private).
2. Submit a webform which has deferred submissions configured.
Handle this and similar conditions by logging a message and falling back to standard submission process, similar to the way that failure to acquire a lock is handled.
Code changes and retest.
Active
1.0
Code
Fixed in 1.1.x because we no longer access anything in the private files directory.