I have spend a good part of the day tracking down a parsing problem causing a page containing a formit call to break.
After rewriting the code a couple of times I finally found the problem.
Any @ character inside my formit call is breaking the parsing of this particular chunk. If I remove all @ characters , everything is fine. If I even add a single one of them, everything after that character gets messed up in the most horrible way.
A form without any email address to send your mails to is a bit pointless, so this is a real game stopper for me.
I have checked, double checked and tripple checked for missing backticks. PLease have a look, If I'm missing something stupid:
[[!FormIt?
&hooks=`email,FormItAutoResponder`
&store=`1`
&placeholderPrefix=`fi.`
&emailTpl=`kontaktformular_emailTpl_body`
&emailFrom=`[email protected]`
&emailSubject=`Nachricht vom Kontaktformular`
&_emailTo=`[email protected]`
&_emailCC=`[email protected]`
&emailTo=`[email protected]`
&fiarTpl=`kontaktformular_emailTpl_body`
&fiarFrom=`[email protected]`
&fiarSubject=`Nachricht über Kontaktformular.`
&fiarReplyTo=`[[+fi.email]]`
&fiarCC=`[email protected]`
&validate=`nospam:blank,
name:required,
email:email:required,
subject:required,
text:required:stripTags`
&successMessage=`
<p>
<i class="icon-ok"></i> Ihre Nachricht wurde erfolgreich versendet.
Zur Erinnerung senden wir eine Kopie dieser Nachricht an ihre E-Mail Adresse.
</p>
`
&validationErrorMessage=`
<p>
<i class="icon-warning-sign"></i> Ihre Formulareingaben sind unvollständig oder fehlerhaft.
Bitte überprüfen Sie ihre Angaben in den <strong class="text-error">rot gekennzeichneten</strong> Formularfeldern.
</p>
`
]]
I'm working on MACOS 10.6 (Snow Leopard) with Google Chrome, I have created quite a lot of forms on this machine, so I don't think this is related to client side soft- or hardware. (Update: I just checked with Win8/Chrome on a different machine, I get the same result).
I also disabled CodeMirrow without any positive effect.
This problem is not caused by FormIt itself. If I rename the snippet call, the problem is still there. Nevertheless I removed and reinstalled Formit. No effect.
I wrote a custom snippet and passed an email address to this snippet. It didn't cause the page to break and the whole email address was displayed. Because of this, I'm fairly sure that there is another thing apart from the @ character causing this behaviour.
Other things I did:
I tried different Browsers (FF, Opera and even IE). No effect.
I wrote the code in Komodo Edit and and pasted it into MODX. No effect.
I don't know where to look next.
System:
I'm develloping on skytoaster (PHP 5.3.23, MySQL 5.5.30).
My MODX Version is 2.2.6-pl (traditional)
Database and collation are set to utf-8_general_ci.
Any advice where to look next?
Regards,
pepebe