The Message field is emptied after a failed validation (not a bug)
asiby - October 13, 2009 - 17:37
| Project: | OG Contact |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | asiby |
| Status: | by design |
Jump to:
Description
The Message field is emptied and is not highlighted when the form is re-displayed to show the failed validation.

#1
#2
After analyzing our site, I have discovered that this was due to an incompatibility with FCKEditor. After excluding the field edit-message from FCK editor's affected field (in FCKEditor's admin area), everything worked perfectly.
I will change the state of this ticket to "by design". It is not a bug. It is rather a known behavior when og_contact is coupled with FCKEditor. Hard to say at this point who should fix his module :)
Cheers
A. Siby
#3
#4
This is almost certainly an issue with FCKEditor, as OG Contact (as well as Contact if I recall correctly) only send out plain text email as a result of their implementation of drupal_mail(). Even if you add HTML to the message field, the headers for the email will be set like this:
<?php// Build the default headers
$headers = array(
'MIME-Version' => '1.0',
'Content-Type' => 'text/plain; charset=UTF-8; format=flowed; delsp=yes',
'Content-Transfer-Encoding' => '8Bit',
'X-Mailer' => 'Drupal'
);
?>
And the resulting message will contain HTML elements encoded as plain text.
I'm not sure why that would cause it to not pass validation though. OG Contact doesn't implement any special validation that would cause that.
I wold be curious to see if you notice the same behavior on the core Contact module.
Anyway, your assessment of by design is probably correct.