[ZPT] Latest Page Templates broke my working ZClasses!
Brad Clements
bkc@murkworks.com
Wed, 22 Aug 2001 13:16:23 -0400
I have a Product with some ZClasses that are based on CMF base objects.
Under ZPT 1.3, what I describe below worked. Now after upgrading to 1.4 I find that I
can't call manage_changeProperties from within a ZPT.
I have a ZPT named 'Edit' in the ZClasses Methods folder.
I looks like this:
<span tal:replace="structure
here/standard_html_header"><html><head></head><body></body></html></span>
<p tal:replace="structure here/CategoriesToJava"></p>
<p tal:replace="structure here/FormJavaScript"></p>
<div tal:condition="request/DoEditSheet|nothing"
style="color:red">
<span tal:replace="nothing"
tal:define="result
python:here.propertysheets.General.manage_changeProperties(request)" />
Attributes Changed
</div>
<form id="EditForm"
tal:attributes="action python:request.URL0;method string:post">
<snip>
Basically the hidden "DoEditSheet" input field kicks off a call to
manage_changeProperties. This used to work in 1.3
Now, I get this traceback:
Unauthorized
You are not authorized to access this resource.
Username and password are not correct.
Traceback (innermost last):
File /usr/holmes/AdkWood/lib/python/ZPublisher/Publish.py, line 223, in publish_module
File /usr/holmes/AdkWood/lib/python/ZPublisher/Publish.py, line 187, in publish
File /usr/holmes/AdkWood/lib/python/ZPublisher/Publish.py, line 162, in publish
File /usr/holmes/Zope-2.3.3/lib/python/ZPublisher/BaseRequest.py, line 463, in traverse
File /usr/holmes/AdkWood/lib/python/ZPublisher/HTTPResponse.py, line 588, in unauthorized
Unauthorized: (see above)
As a check, I can manage the zclass instance properties from ZMI.
Further, I created a Python Script and made it the target of the form action and it works:
if REQUEST.has_key('DoEditSheet'):
context.propertysheets.General.manage_changeProperties(REQUEST)
REQUEST.RESPONSE.redirect(REQUEST['URL1']+'/Edit')
This is a very weird error "password not correct"
Any idea how to fix?
Brad Clements, bkc@murkworks.com (315)268-1000
http://www.murkworks.com (315)268-9812 Fax
netmeeting: ils://ils.murkworks.com AOL-IM: BKClements