First of all, I can't stand how Zope acutally runs inputted dtml through its parser to check for errors or whatever, when you 'Save changes' on a website... and then looses the changes...sigh. :) I'm having a problem with the following script, it gives me an error when I save, that its missing a closing <dtml-sendmail> tag. -------- start --------- <table width="100%" cellspacing="6" cellpadding="0" border="0"> <tr> <td width="150" valign="top"><dtml-var standard_menubar></td> <td align="middle" valign="top"> <dtml-try> <dtml-sendmail mailhost="MailHost"> To: <dtml-if expr="AUTHENTICATED_USER.getUserName() != 'Anonymous User'"> <dtml-var Message_To> <dtml-else> metatron@myseraph.org </dtml-if> From: <dtml-var expr="AUTHENTICATED_USER.getUserName()"> (mySeraph.org User) Subject: <dtml-var Message_Subject> You have been sent a message from the mySeraph.org website. The message is from: <dtml-var expr="AUTHENTICATED_USER.getUserName()"> Please note that you can not respond to this message in email. <dtml-if expr="AUTHENTICATED_USER.getUserName() != 'Anonymous User'> You may reply to the sender by entering a message into the following site: http://www.mySeraph.org/Contact/?Message_To=<dtml-var expr="AUTHENTICATED_USER.getUserName()"> Message as follows: ---------------------------------------------------- <dtml-var Message_Text> ---------------------------------------------------- Message end. </dtml-sendmail> <dtml-except> <h2>Ack! An error has occured in the processing of your mail!</h2> Information: <code> <br> <dtml-var error_type> <br> <dtml-var error_value> <br> <dtml-var error_tb> </code> <dtml-else> <P> </P><IMG alt="" border="2" height="237" src="MessageSent.jpg" width="350"> <P> <IMG align=baseline alt ="" border=0 height=128 src="CongratsSmiley.jpg" width=400 > </P> <P>Your message has been sent.</P> </dtml-try> </td> </tr> </table> ------- end -------- What am I doing wrong?
Hostway Generic wrote:
First of all, I can't stand how Zope acutally runs inputted dtml through its parser to check for errors or whatever, when you 'Save changes' on a website... and then looses the changes...sigh. :)
so move to ZPT :P ;-)
<dtml-sendmail mailhost="MailHost"> To: <dtml-if expr="AUTHENTICATED_USER.getUserName() != 'Anonymous User'"> <dtml-var Message_To> <dtml-else> metatron@myseraph.org </dtml-if> From: <dtml-var expr="AUTHENTICATED_USER.getUserName()"> (mySeraph.org User) Subject: <dtml-var Message_Subject>
You have been sent a message from the mySeraph.org website. The message is from: <dtml-var expr="AUTHENTICATED_USER.getUserName()"> Please note that you can not respond to this message in email. <dtml-if expr="AUTHENTICATED_USER.getUserName() != 'Anonymous User'> ^^^ You're missing a "
If you get an error in a bug, DTML will complain about that block not being closed, ratehr than telling you what the error really is. I'd just switch to ZPT, there's _much_ more energy there, Guidos' working on it ;-) cheers, Chris
parser to check for errors or whatever, when you 'Save changes' on a website... and then looses the changes...sigh. :)
Back button ;) You have and unclosed if tag <dtml-if expr="AUTHENTICATED_USER.getUserName() != 'Anonymous User'> that is not closed before the </dtml-sendmail> tag. -- Andy McKay ----- Original Message ----- From: "Hostway Generic" <myseraph@myseraph.org> To: <zope@zope.org> Sent: Thursday, April 05, 2001 12:33 AM Subject: [Zope] DTML error...
First of all, I can't stand how Zope acutally runs inputted dtml through its parser to check for errors or whatever, when you 'Save changes' on a website... and then looses the changes...sigh. :)
I'm having a problem with the following script, it gives me an error when I save, that its missing a closing <dtml-sendmail> tag.
-------- start --------- <table width="100%" cellspacing="6" cellpadding="0" border="0"> <tr> <td width="150" valign="top"><dtml-var standard_menubar></td> <td align="middle" valign="top">
<dtml-try> <dtml-sendmail mailhost="MailHost"> To: <dtml-if expr="AUTHENTICATED_USER.getUserName() != 'Anonymous User'"> <dtml-var Message_To> <dtml-else> metatron@myseraph.org </dtml-if> From: <dtml-var expr="AUTHENTICATED_USER.getUserName()"> (mySeraph.org User) Subject: <dtml-var Message_Subject>
You have been sent a message from the mySeraph.org website. The message is from: <dtml-var expr="AUTHENTICATED_USER.getUserName()"> Please note that you can not respond to this message in email. <dtml-if expr="AUTHENTICATED_USER.getUserName() != 'Anonymous User'> You may reply to the sender by entering a message into the following site: http://www.mySeraph.org/Contact/?Message_To=<dtml-var expr="AUTHENTICATED_USER.getUserName()">
Message as follows: ---------------------------------------------------- <dtml-var Message_Text> ---------------------------------------------------- Message end. </dtml-sendmail> <dtml-except> <h2>Ack! An error has occured in the processing of your mail!</h2> Information: <code> <br> <dtml-var error_type> <br> <dtml-var error_value> <br> <dtml-var error_tb> </code> <dtml-else> <P> </P><IMG alt="" border="2" height="237" src="MessageSent.jpg" width="350"> <P> <IMG align=baseline alt ="" border=0 height=128 src="CongratsSmiley.jpg" width=400 > </P> <P>Your message has been sent.</P> </dtml-try> </td> </tr> </table>
------- end --------
What am I doing wrong?
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Hostway Generic asks
I'm having a problem with the following script, it gives me an error when
I
save, that its missing a closing <dtml-sendmail> tag.
... Message as follows: ------- end -------- ... What am I doing wrong?
I don't know about Zope's parser, but it's possible that the strings of dashes "-----" are the problem. They are part of comment delimiters, and some parsers don't understand that they are not comment delimiters when they are in isolation, especially if there are an odd number of the dash characters. Try changing them to equal signs "===========" and see if that eliminates the error. Cheers, Tom P
participants (4)
-
Chris Withers -
Hostway Generic -
Thomas B. Passin -
Zopista