This seems to be missing in this version of site access. I am followig the url based session howto. There is a file ChangeBehaviors.py in the SiteAcces 1.x versions that seem to be missing in 2.0b3 that defines this function. An oversight or is there a change in API? Zope version: Zope 2.2.1 (binary release, python 1.5.2, solaris-2.6-sparc) Regards, Albert Boulanger aboulanger@ldeo.columbia.edu
From: "albert boulanger" <aboulang@ldeo.columbia.edu>
An oversight or is there a change in API?
Change in API; You want REQUEST.setServerURL, which is documented here: http://www.zope.org/Members/michel/Projects/Interfaces/ImplementingVirtualHo sts Cheers, Evan @ 4-am & digicool
Change in API; You want REQUEST.setServerURL, which is documented here: http://www.zope.org/Members/michel/Projects/Interfaces/ImplementingVirtualHo sts Ok the doc says: Backward Rewriting Any URLs generated by an application should take virtual hosting into account by replacing the VirtualRoot's physical path with its virtual path. The base elements may also need to be rewritten. REQUEST.setServerURL(protocol=None, hostname=None, port=None) ->> Hmm no path arg mentioned here but the description says.... This method modifies the URL-related variables in the PublisherRequest to have the specified protocol, hostname, port, and path, while leaving unspecified parts alone. Returns the new value of REQUEST['SERVER_URL']. What happened to the path argument to the function? The doc indicates its should be there, but it seems to be missing: Zope Error Zope has encountered an error while publishing this resource. TypeError Sorry, a Zope error occurred. Traceback (innermost last): File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py, line 187, in publish File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: Traversable) File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py, line 162, in publish File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/ZPublisher/BaseRequest.py, line 309, in traverse File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/ZPublisher/BeforeTraverse.py, line 85, in __call__ File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/Products/SiteAccess/AccessRule.py, line 22, in __call__ File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/ZPublisher/BeforeTraverse.py, line 112, in __call__ File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/OFS/DTMLMethod.py, line 172, in __call__ (Object: dtProcessSession) File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/DocumentTemplate/DT_String.py, line 528, in __call__ (Object: dtProcessSession) File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/DocumentTemplate/DT_Util.py, line 337, in eval (Object: REQUEST.setServerURL(path=REQUEST.steps+[SessionID])) (Info: REQUEST) File <string>, line 0, in ? TypeError: unexpected keyword argument: path Puzzled, Albert Boulanger aboulanger@ldeo.columbia.edu
participants (2)
-
albert boulanger -
Evan Simpson