Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I needed to send notification emails with the submission URL using https as the admin users login in over https and only access the admin section over the same and with Drupal set up so there is no session sharing between http and https which means that the admin users are not logged on over http so would have to manually change the submission URL in the email to https to be able to view the submission.
I've created a patch against 7.x-3.18 that adds %submission_url_secure token that provides the https version of the submission URL.
Comment | File | Size | Author |
---|---|---|---|
#1 | secure_submission_url_token_for_emails2.patch | 1.02 KB | Altcom_Alan |
secure_submission_url_token_for_emails.patch | 1.06 KB | Altcom_Alan | |
Comments
Comment #1
Altcom_Alan CreditAttribution: Altcom_Alan commentedJust noticed I'd put the new token after the original which meant the original was replacing first so the URLs had _secure left on the end.
Rerolled patch with the new token declared first so it's replaced first.
Comment #2
DanChadwick CreditAttribution: DanChadwick commentedThis seems reasonable, but we aren't adding features to the -3.x branch any more. I would welcome a patch for 7.x-4.x.
Comment #3
DanChadwick CreditAttribution: DanChadwick commentedIt seems like you can build the URL yourself. Something like:
https://YOURDOMAIN.TLD/node/[node:nid]/submission/[submission:sid]
And if that didn't work, you can always generate your own token(s). See hook_tokens and hook_token_info.
Comment #4
cirrus3d CreditAttribution: cirrus3d commentedFor me #3 was about right.
For 3.x I had to do something like:
https://example.com/node/%nid/submission/%sid
and it worked fine.