Situation: I have copied the webform-mail.tpl.php file, altered the copy, and uploaded this altered version to my theme's directory. Webform module will ignore this template.

When I go to the e-mails tab, click on Edit, and go to the E-mail template fieldset, the template selected in the dropdown will be "Custom template". Switching to "Default template" works, of sorts, but after I reload the tab the dropdown will have been reset to "Custom template".

This is not what I want.

At first I thought this had to do with the bug reported at http://drupal.org/node/787874, but that one has been fixed, and the fix was apparently rolled out in version 3.6. Furthermore quicksketch says in the bug report that it was always "Default template" that was selected in the buggy version (3.4), whereas in my case it is the other way around.

Acting on a hunch, I disabled the CKEditor for the template's text area, and that fixed my problem (adding "webform@node/*/webform/emails/*" to the visibility settings).

It would be nice if CKEditor did not confuse Webform as much.

This bug also seems to have been mentioned in a comment to another bug report, http://drupal.org/node/949242#comment-3969308 .

CommentFileSizeAuthor
#1 webform_ckeditor_templates.patch759 bytesquicksketch

Comments

quicksketch’s picture

Status: Active » Fixed
StatusFileSize
new759 bytes

I think this patch should fix the problem, but (as I tell most users) I suggest using WYSIWYG over CKEditor because it wouldn't have made this mistake to begin with. If not using any kind of HTML-email system (like MIME Mail) this patch will force the editor to be plain text. Otherwise it may be manually toggled on or off like it is currently. I also disabled CKEditor on the hidden field that contained the actual default template, which CKEditor also could have been screwing up. Please reopen this issue if this patch does not correct the problem, I've already committed it to Git since it's definitely not going to do any harm.

(Thanks also for your extensive searching before posting this issue, that made things much easier for me.)

quicksketch’s picture

Note that this patch won't apply to your current install of 3.9, I'd suggest just manually excluding the fields for now with CKEditor's interface or setting #wysiwyg = FALSE directly, since the 3.9 version of the module doesn't have the webform_email_html_capable() function at all.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.