RE: [Zope] addDTMLDocument Help!
-----Original Message----- From: Brian Brown [mailto:Brian.Brown@smawins.com] Sent: Wednesday, August 04, 1999 1:54 PM To: Michel Pelletier; zope@zope.org Subject: Re: [Zope] addDTMLDocument Help!
Michel Pelletier wrote:
-----Original Message----- From: brian.brown@smawins.com [mailto:brian.brown@smawins.com] Sent: Wednesday, August 04, 1999 1:16 PM To: zope@zope.org Subject: [Zope] addDTMLDocument Help!
<!--#call
"manage_addDTMLDocument(newid,newtitle,content_template)"-->
Without the 'content_template' it works fine. 'content_template' is a DTML method, and it does contain a couple of DTML tags.
What is the error message and traceback you get at this point?
-Michel
Sorry, an error occurred.
Traceback (innermost last): TypeError: argument 1: expected read-only character buffer, ExplicitAcquirerWrapper found
I believe the method you are calling is looking for a string, not another DTML Document/Method object. If it is the case that you want to clone an existing object, just use the clone call. <dtml-with "manage_clone(content_template, newid, REQUEST)"> <dtml-call "manage_changeProperties(title=newtitle)"> </dtml-with> -Michel
Michel Pelletier wrote:
I believe the method you are calling is looking for a string, not another DTML Document/Method object. If it is the case that you want to clone an existing object, just use the clone call.
<dtml-with "manage_clone(content_template, newid, REQUEST)"> <dtml-call "manage_changeProperties(title=newtitle)"> </dtml-with>
-Michel
Okay, here is what happens now :) Here is the form that collects the info (DTML Method): ------------------------------------------------------------- <!--#var standard_html_header--> <form method=POST action="addDoc"> New Id:<input type=text name="newid:text" size=20><br> New title:<input type=text name="newtitle:text" size=20><br> Email:<input type=text name="emailaddress:text" size=20><br> <input type=submit> </form> <!--#var standard_html_footer--> ------------------------------------------------------------- Here is the addDoc DTML method that I am trying the manage_clone in: ------------------------------------------------------------- <!--#with "manage_clone(content_template,newid,REQUEST)"--> <!--#call "manage_changeProperties(email=emailaddress)"--> <!--#/with--> <!--#var standard_html_header--> <H2>I just added the <!--#var newtitle--> Document</H2> <!--#var standard_html_footer--> ------------------------------------------------------------- And the resultant traceback.... ------------------------------------------------------------- Sorry, an error occurred. Traceback (innermost last): File /home/Zope/lib/python/ZPublisher/Publish.py, line 255, in publish_module File /home/Zope/lib/python/ZPublisher/Publish.py, line 161, in publish File /home/Zope/lib/python/ZPublisher/mapply.py, line 154, in mapply (Object: addDoc) File /home/Zope/lib/python/ZPublisher/Publish.py, line 98, in call_object (Object: addDoc) File /home/Zope-1.10.2-src/lib/python/OFS/DTMLMethod.py, line 158, in __call__ (Object: addDoc) File /home/Zope-1.10.2-src/lib/python/OFS/DTMLMethod.py, line 338, in decapitate ValueError: Invalid Header (0): ------------------------------------------------------------- If I remove REQUEST from the list of parameters, the traceback changes: ------------------------------------------------------------- ! System Unavailable This site is currently experiencing technical difficulties. Please contact the site administrator for more information. For additional technical information, please refer to the HTML source for this page. Thank you for your patience. Traceback (innermost last): File /home/Zope/lib/python/ZPublisher/Publish.py, line 255, in publish_module File /home/Zope/lib/python/ZPublisher/Publish.py, line 161, in publish File /home/Zope/lib/python/ZPublisher/mapply.py, line 154, in mapply (Object: addDoc) File /home/Zope/lib/python/ZPublisher/Publish.py, line 98, in call_object (Object: addDoc) File /home/Zope-1.10.2-src/lib/python/OFS/DTMLMethod.py, line 155, in __call__ (Object: addDoc) File /home/Zope-1.10.2-src/lib/python/OFS/DTMLMethod.py, line 151, in __call__ (Object: addDoc) File /home/Zope-1.10.2-src/lib/python/DocumentTemplate/DT_String.py, line 513, in __call__ (Object: addDoc) File /home/Zope-1.10.2-src/lib/python/DocumentTemplate/DT_With.py, line 131, in render (Object: manage_clone(content_template,newid)) File /home/Zope-1.10.2-src/lib/python/DocumentTemplate/DT_Util.py, line 266, in eval (Object: manage_clone(content_template,newid)) File <string>, line 0, in ? File /home/Zope-1.10.2-src/lib/python/OFS/CopySupport.py, line 254, in manage_clone (Object: Navigation) File /home/Zope-1.10.2-src/lib/python/OFS/CopySupport.py, line 325, in _verifyObjectPaste (Object: Navigation) AttributeError: (see above) Any ideas? Thanks, Brian
participants (2)
-
Brian Brown -
Michel Pelletier