Hi! I have the Calendar product installed and starting to work with it. I am using the code from the New Riders book (Spicklemire et al.) and it was all going fine until the last piece of the example code, when I get an error message: Error Type: Bad Request Error Value: The id "2003/02/01" contains characters illegal in URLs. ------------------------------------------- <dtml-calendar> <dtml-let year="date.year()" month="date.month()" day="date.day()" key="'%.2d-%.2d-%.2d'%(year,month,day)"> <a href=editEvent?date=<dtml-var key>><dtml-var day></a><br> <dtml-with Events> <dtml-if "_.has_key(date)"> <dtml-var "_.getitem(key)"> <dtml-call "RESPONSE.redirect(URL1 + '/Events/' + date + '/manage_editForm')"> <dtml-else> <dtml-call "manage_addDTMLDocument(id=_['date'],title='',file='')"> <dtml-var editEvent> </dtml-if> </dtml-with> </dtml-let> </dtml-calendar> ===== Philip Swann, Les Grands Chenes, 10, ch. Magny, 01280 Prevessin, France -- mobile: +33 611 754429 -- home: +33 450405085 -- philip.swann@arunasoftware.com -- philip_swann@yahoo.com __________________________________________________ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com
Don't use _['date'] for an id. It contains characters ('/') that are illegal in the names of Zope objects. If you want the calendar object to be named for a specific date, try something like: <dtml-call "manage_addDTMLDocument(id=year+'_'+month+'_'+day,title='',file='')"> HTH, Dylan At 01:32 AM 2/13/2003, Philip Swann wrote:
Hi!
I have the Calendar product installed and starting to work with it. I am using the code from the New Riders book (Spicklemire et al.) and it was all going fine until the last piece of the example code, when I get an error message:
Error Type: Bad Request Error Value: The id "2003/02/01" contains characters illegal in URLs.
-------------------------------------------
<dtml-calendar> <dtml-let year="date.year()" month="date.month()" day="date.day()" key="'%.2d-%.2d-%.2d'%(year,month,day)"> <a href=editEvent?date=<dtml-var key>><dtml-var day></a><br> <dtml-with Events> <dtml-if "_.has_key(date)"> <dtml-var "_.getitem(key)"> <dtml-call "RESPONSE.redirect(URL1 + '/Events/' + date + '/manage_editForm')"> <dtml-else> <dtml-call "manage_addDTMLDocument(id=_['date'],title='',file='')"> <dtml-var editEvent> </dtml-if> </dtml-with> </dtml-let> </dtml-calendar>
===== Philip Swann, Les Grands Chenes, 10, ch. Magny, 01280 Prevessin, France -- mobile: +33 611 754429 -- home: +33 450405085 -- philip.swann@arunasoftware.com -- philip_swann@yahoo.com
__________________________________________________ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
Dylan Reinhardt -
Philip Swann