Closed (fixed)
Project:
Webform
Version:
6.x-2.3
Component:
Code
Priority:
Minor
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
13 Nov 2008 at 18:53 UTC
Updated:
8 Apr 2011 at 15:34 UTC
"The results of this submission may be viewed at" appears in the footer of emails for users who don't have access to view the page.
Permissions should be checked while compiling the email.
For the meantime, I've removed the footer completely by copying webform-mail.tpl.php over to my theme directory and editing that file. I love Drupal 6!
Comments
Comment #1
quicksketchYep, theming is the only way to go on this. Since we can't actually tell if a user receiving an e-mail is an administrator or not, we can only tell if the user sending the e-mail is an administrator. This theming has to be done manually depending on how you've setup your conditional recipients.
Comment #2
jamel36 commentedcan you explain the fix in newbie terms?
I found the file webform-mail.tpl.php in the sites/all/modules/webform directory and edited it.
I removed the following however it is still emailing the link to the user
print t('The results of this submission may be viewed at:')<?php print url('node/'. $node->nid .'/submission/'. $sid, array('absolute' => TRUE))
Comment #3
kevinquillen commentedHas this been removed/fixed in the latest Webform? It is very confusing for users who get an email with a link, click on it, and get access denied. I don't think this is an acceptable thing to just leave in because its not certain if the recipients are administrators or not. That is kind of like the mailman dropping whatever mail he wants in your mailbox, despite who lives there, because its just easier for him to do so and let you figure it out.
I would say to just remove that line altogether, and make the 'Submissions' a more visible part inside the Drupal admin. Maybe even have a status message that says 'there were X new webform submissions since your last login', and link to the page.
As it is now, it just really throws a lot of users for a loop who get an email, click the links in them, and comes up access denied, all for the convenience of a shortcut link.
I will just remove it from the tpl and hope that fixes it.
Comment #4
aiche commentedI commented out the line
from webform-mail.tpl.php about a month ago and it worked. But then all of a sudden it started to show up again. I have reviewed the file many times and it is still commented out. I also tried to remove the link completely but it still emails the link.
Then I tried to delete the file and it still somehow emails the confirmation email with the link just as past confirmation emails have been sent.
Any help is appreciated. Thanks.
Comment #5
gpk commentedThe correct way of customizing the email is to copy the webform-mail.tpl.php to your theme's main directory and then edit the template there. You will need to visit the site configuration/performance page and hit Clear cached data after you initially copy the template over, in order that it gets picked up.
A possible drawback with this method is that this links the (plain text) email to your site's theme - though not usually a problem unless you have more than one theme in use.
Perhaps what is really needed is a bit of a UI to provide finer control of what gets put in the email. A job for a new contrib module perhaps.
Comment #6
gpk commentedActually it looks as if #277581: Send emails with a custom/templated body (and subject, to addresses and from addresses) does much if not all of what I'm suggesting. 6.x-3.x only, for 6.x-2.x you still need to do it via templates.
Comment #7
RichieRich commentedI'm actually confused as to why anybody would ever want this information in an email. Same goes for the 'submitted' information.
Comment #8
kevinquillen commentedWell, the good news is you can get rid of it and change it with the TPLs now.
Comment #9
allanx commentedJust to confirm, this method of deleting this code:
print t('The results of this submission may be viewed at:')print url('node/'. $node->nid .'/submission/'. $sid, array('absolute' => TRUE))in webform-mail.tpl.php worked for me too.
Thanks
Comment #10
vfranklyn commentedThis is exactly what I needed to know. It worked great for me. Thanks so much!
Comment #11
1websitedesigner commentedSubscribing
Comment #12
quicksketchIn the 3.x branch you just remove the line from the template if you don't want it. You can do this through the interface when you configure an e-mail.