Problem/Motivation
If a webform is deleted and there are unprocessed submissions in the queue, an error occurs when the item is processed because the webform submission no longer exists. Additionally, when a webform is deleted a submission with state=deleted is added to the queue. Processing those items subsequently fails.
Steps to reproduce
- Submit a webform
- Check that the queue item has not been submitted yet (increase the cron interval if necessary if the queue is being processed by cron
- Delete the webform
- Use the Queue Manager UI to process the queue
The error Call to a member function getWebform() on null in Drupal\webform_post_remote_queue\Plugin\QueueWorker\WebformPostRemoteQueue->processItem() is shown.
Proposed resolution
Do not post deleted submissions to the queue, and check does the webform submission still exist when processing the queue items.
Issue fork webform_post_remote_queue-3523583
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
peacog commentedComment #5
peacog commented