Drupal\webform\WebformRequest::getUrl(): Argument #1 ($webform_entity) must be of type Drupal\Core\Entity\EntityInterface, null given

Created on 5 September 2025, 17 days ago

Problem/Motivation

Drupal\webform\WebformRequest::getUrl(): Argument #1 ($webform_entity) must be of type Drupal\Core\Entity\EntityInterface, null given, called in /container/application/sector/web/modules/contrib/webform/modules/webform_submission_log/src/Controller/WebformSubmissionLogController.php on line 143 in Drupal\webform\WebformRequest->getUrl() (line 229 of /container/application/sector/web/modules/contrib/webform/src/WebformRequest.php).

Steps to reproduce

Webform 6.2.x
enable submodule webform_submission_log
create a number of submissions with different status including deleted ones
view submission log (admin/structure/webform/manage/myweform/results/log) - will show WSOD

This is due to the deleted submissions that does not hold any data anymore but still exist in webform_submission_log.

Proposed resolution

Possibly add a check if the submission data is missing? rather than assume there is always data as per here:

          $log_webform_submission = $this->getSubmissionStorage()->load($log->sid);
          $row['sid'] = [
            'data' => [
              '#type' => 'link',
              '#title' => $log->sid,
              '#url' => $this->requestHandler->getUrl($log_webform_submission, $source_entity, 'webform_submission.log'),
            ],
          ];

One thing I am not certain if there is any config that could possibly affect how I am seeing this? Any idea? Many thanks

🐛 Bug report
Status

Active

Version

6.2

Component

Code

Created by

🇳🇿New Zealand janpongos

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