Email link to file includes '_sid_' rather than actual sid value

Created on 7 October 2020, almost 4 years ago
Updated 28 April 2023, over 1 year ago

Problem/Motivation

Some of the webforms we use on our site include uploaded documents/images. In the submission email we include a link to the uploaded file/image so the recipient can login, click the link and access the file.

Until recently (last couple of weeks) this worked fine. Now however the reference to the link no longer includes the real sid value but instead the placeholder text '_sid_'. As a result the file can't be accessed by clicking the link in the email since the link is incorrect.

This is what we used to have (and would like):
domain/system/files/webform/test_form/797/document.pdf

This is what we see now:
domain/system/files/webform/test_form/_sid_/document.pdf

The files are successfully stored in the a folder for the corresponding form with a sid value and the files can be also be accessed through the submissions page on the webform as expected.

Steps to reproduce

Create a simple form with a file upload
Edit the File field and under Advanced set the Submission display is set to Link or URL
Create an email handler to send the form to you on submission and include:
[webform_submission:values]
[webform_submission:sid]
Send a Test email

The resulting email will include the correct sid value for the [webform_submission:sid] but the URL of the file will have the placeholder '_sid_' instead of the real value.

Proposed resolution

Force webform submission attachments to be loaded from the DB.

🐛 Bug report
Status

Fixed

Version

5.0

Component

Code

Created by

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024