[Zope] smpthost or dtml tag problems

Hamzat Kamal hamzatk at dnetsystems.net
Wed Sep 22 14:26:49 EDT 2004


Dear All,

I do not know what I am doing wrong here. when I executed the below codes 
it gives the error below for both true and false conditions, but when i 
change the line 1 to <dtml-if "email "> it stop giving the error but allow 
user sending without entering email address.


<dtml-if "email and '@' in email">

<dtml-sendmail smtphost="mail.domain.com">
To: <advert at domain.com>
From: <<dtml-var email>>
cc: <kamal at dv.net>
Subject: Advert Placement


Name: <dtml-var fullnames>

Company Name: <dtml-var company>

</dtml-sendmail>

<dtml-else>

   <P>Please complete all of the required fields.<br>
   The following fields are missing:</P>

<dtml-comment>
Display the emtpy fields.  Repeat the   <dtml-if "requiredfieldname 
==''">....</dtml-if> for each field you want to display.
</dtml-comment>

<dtml-if "email == ''">
   E-mail address</p>
</dtml-if>


</dtml-if>



An error was encountered while publishing this resource.

TypeError
Sorry, a site error occurred.

Traceback (innermost last):
    * Module ZPublisher.Publish, line 150, in publish_module
    * Module ZPublisher.Publish, line 114, in publish
    * Module Zope.App.startup, line 182, in zpublisher_exception_hook
    * Module ZPublisher.Publish, line 98, in publish
    * Module ZPublisher.mapply, line 88, in mapply
    * Module ZPublisher.Publish, line 39, in call_object
    * Module OFS.DTMLMethod, line 126, in __call__
    * Module DocumentTemplate.DT_String, line 474, in __call__
    * Module OFS.DTMLMethod, line 119, in __call__
    * Module DocumentTemplate.DT_String, line 474, in __call__
    * Module OFS.DTMLMethod, line 119, in __call__
    * Module DocumentTemplate.DT_String, line 474, in __call__
    * Module DocumentTemplate.DT_Util, line 201, in eval
    * __traceback_info__: email
    * Module <string>, line 2, in f
    * Module OFS.ObjectManager, line 645, in __getitem__
    * Module OFS.ObjectManager, line 237, in _getOb
TypeError: unsliceable object (Also, an error occurred while attempting to 
render the standard error message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20040922/12239e9b/attachment.htm


More information about the Zope mailing list