Error processing queue items when webform was deleted

Created on 9 May 2025, 2 months ago

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

  1. Submit a webform
  2. Check that the queue item has not been submitted yet (increase the cron interval if necessary if the queue is being processed by cron
  3. Delete the webform
  4. 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.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇪🇸Spain Peacog

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024