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
[EMAIL PROTECTED]


_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to