I have read and reread all of the documentation and issues I can find related to creating a webform-mail-[nid].tpl.php file and placing it in the appropriate theme directory to no avail.

I have created webform-mail-92.tpl.php and placed it in the root directory of my fusion subtheme. When that did not work I also created a templates directory in the fusion subtheme root and placed the file there also. I have the Template type set to "Default". BTW - it took 3 hours to finally find out why I could not get the Template type to recognize "Default" (had to change the textarea to plain text, switch to Custom and then back to default. This needs to be addressed in the future if possible.)

Webform continues to ignore the webform-mail-92.tpl.php file.

Could someone please help me figure out what is going wrong? I desperately need to get this working and I cannot style the emails the way I need to by typing in the plain text textarea since you cannot include any formatting information there.

Thanks in advance . . . Mike

Comments

ecsmike’s picture

Version: 7.x-3.9 » 6.x-3.9

My initial submission contained erroneous information. The version of Webform I am using is actually 6.x.3.9 NOT 7.x.3.9.

Mike

quicksketch’s picture

Category: bug » support

Per pretty much all theming requests, I'm pretty sure this is misunderstanding the system.

(had to change the textarea to plain text, switch to Custom and then back to default. This needs to be addressed in the future if possible.)

I can't help it that various WYSIWYG modules decide to turn on an editor on textareas that should not have editors on them. You can disable this in your module that you use to provide your rich text editor. If you were using the "WYSIWYG" module, you wouldn't have this problem because it only enabled itself when there is an associated "Input format" select list. Since the E-mail template is not run through the usual filtering system, WYSIWYG module is smart enough not to enable an editor on it (unlike most other less-intelligent rich text modules).

In any case, just to make sure theming works (again). I did the following with success:

- I created a brand new sub-theme of Zen module (to make sure it works with sub-themes). With nothing but a .info file.
- I went back to the site, changed my theme to the new sub-theme.
- I copied webform-mail.tpl.php into my theme and renamed it webform-mail-999.tpl.php.
- I opened this file and add "THEMED E-MAIL" to the top of the template file.
- I flushed my Drupal caches at admin/settings/performance.
- I filled out a submission that sent an e-mail from node 999 using the default theming.
- The themed e-mail came through to my inbox.

So the net result is I can't reproduce this problem. Theming works as expected.

ecsmike’s picture

Thank you for responding to my request for assistance.

I am very confused at this point because I have replicated your steps exactly (after forcing the email template textarea to plain text only) with the same results as before. Webform reads the default webform-mail.tpl.php in the webform/templates directory but continues to ignore the webform-mail-94.tpl.php file in the subtheme root directory (and I have verified and re-verified that the nid of the form is indeed 94.

Since my custom theme is a fusion subtheme, my theme directory structure is:
fusion
fusion_core
fusion_kc (subtheme being used)
fusion_starter
fusion_starter_lite

I have tried placing webform-mail-94.tpl.php in the fusion_kc root, in the fusion root, and the fusion_core root. All with the same result that webform does not see or use the file but rather uses the default webform-mail.tpl.php file in the webform/templates directory. In all cases I have cleared all drupal caches and the browser cache.

Do you have any suggestions for troubleshooting this?

Again, thank you for your response to my initial posting.

Mike

quicksketch’s picture

Try doing it in a theme that isn't Fusion or a sub-theme. Also make sure that the theme you're putting the e-mail template in is the same theme that's actually being used when you view the webform node. If this is a Fusion-specific problem, the issue may need to be moved over there, but I'm still guessing there's some user-error here. Also make sure that "default" is the value for the "template" column in the database table "webform_emails" for your NID 94.

quicksketch’s picture

quicksketch’s picture

Status: Active » Closed (duplicate)