[Zope] skinscript and URL traversal question
Aaron Payne
aaron@aaronpayne.com
Wed, 17 Jan 2001 14:47:27 -0500
Hi all,
I'm using a zsql method in a skinscript with query ... compute ... and it
mostly works. Calling the dataskin where the id is part of the query
string (coupon id=977931214.694) works. For example,
http://CouponSite/CouponManager/CouponAttributes?Cid=977931214.694
Where:
CouponManager is a specialist
977931214.694 is the id of the coupon
CouponAttributes looks up the dataskin with:
<dtml-with "getItem(Cid)">
<dtml-var couponattributes>
</dtml-with>
Trying to access the object directly through URL traversal fails.
http://CouponSite/CouponManager/977931214.694/CouponDetails
Where:
CouponDetails displays the coupon attributes with:
<dtml-var couponattributes>
It returns a not found error. The CouponManager specialist can't find the
coupon 977931214.694.
Any thoughts why this is so?
SkinScript Trigger:
WITH QUERY searchByNameCheck(self.id) COMPUTE
name,username,coupon_text,categorylist,categoryheader,expirationdate,status,couponterms
PythonMethod:
searchByNameCheck
<params>self,name<params>
Cname=name
result=self.searchBy_Name(name=Cname) #zsql method
return result
Error Type: NotFound
Error Value: None
Traceback (innermost last):
File /usr/local/etc/Zope2d/lib/python/ZPublisher/Publish.py, line 222,
in publish_module
File /usr/local/etc/Zope2d/lib/python/ZPublisher/Publish.py, line 187,
in publish
File /usr/local/etc/Zope2d/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
(Object: ProviderContainer)
File /usr/local/etc/Zope2d/lib/python/ZPublisher/Publish.py, line 162,
in publish
File /usr/local/etc/Zope2d/lib/python/ZPublisher/BaseRequest.py, line
338, in traverse
File /usr/local/etc/Zope2d/lib/python/Products/ZPatterns/Specialists.py,
line 25, in __bobo_traverse__
(Object: ProviderContainer)
NotFound: (see above)
Zope version: Zope 2.2.1 (source release, python 1.5.2, linux2)
System Platform: freebsd4
-thanks,
Aaron