Re: zopeXMLMethods and Zope 2.7.x
Francois-regis.Chalaoux@sanofi-aventis.com wrote:
It seems that zopeXMLMethods and Zope 2.7.x do not work correctly together. In fact, installed xml processors are not visible from ZopeXMLMethods object in ZMI (blank list). Personaly I use 4Suite 1.0a4 as processor. Everything work with Zope 2.7.2 but since Zope 2.7.3 every fail.
Have you this problem, solutions ?
Been there too. I've patched the __init__.py. The attached one should work. To fix 4Suite support I did this: In FourSuiteProcessor.py: Remove these lines: if not os.environ.has_key(XML_CATALOGS): os.environ['XML_CATALOGS'] = /please/ignore/this/workaround And replace this: from Ft.Lib.Uri import SchemeRegistryResolver with this: from Ft.Lib.Resolvers import SchemeRegistryResolver /Anton """ $RCSfile: __init__.py,v $ The ZopeXMLMethods package is a Zope product. Author: Chip Morris <cmorris@arielpartners.com> Modified by Philipp von Weitershausen <philikon@philikon.de> $Id: __init__.py,v 1.15 2003/03/30 03:45:47 cstrong Exp $ """ __cvstag__ = '$Name: $'[6:-2] __date__ = '$Date: 2003/03/30 03:45:47 $'[6:-2] __version__ = '$Revision: 1.15 $'[10:-2] import XSLTMethod import CacheManager from XSLTMethod import manage_addXSLTMethod, \ manage_addXSLTMethodForm, addXSLTMethod from CacheManager import manage_addXMLMethodCacheManagerForm, \ manage_addXMLMethodCacheManager, addXMLMethodCacheManager def initialize(context): """ Initialize the ZopeXMLMethods product. This makes the object appear in the Zope product list menu. initialize() is called by Zope when starting a Zope server. """ try: context.registerClass( XSLTMethod.XSLTMethod, constructors = ( manage_addXSLTMethodForm, manage_addXSLTMethod, addXSLTMethod, XSLTMethod.XSLTMethod.availableProcessors, XSLTMethod.XSLTMethod.behaveLikeList), icon = 'www/XSLTMethod.gif' ) context.registerClass( CacheManager.CacheManager, constructors = ( manage_addXMLMethodCacheManagerForm, manage_addXMLMethodCacheManager, addXMLMethodCacheManager, XSLTMethod.findCacheManager), icon = 'www/cache.gif' ) context.registerHelp() except: import sys, traceback, string type, val, tb = sys.exc_info() sys.stderr.write(string.join(traceback.format_exception(type, val, tb), '')) del type, val, tb
What is the best strategy for taking a zope site temporarily offlineso visitors are provided with friendly message while manager (or other intermediate manager roles) can still view. When I mean a zope site, I mean a single site within a zope instance where other sites continue operating as normal. I am running apache in front and realize I could likely set up a new rule to be used for a short period to direct to an apache page, but am hoping someone can suggest a zope solution so that control can be exercised by site manager (as opposed to requiring a person with server root access to manipulate the apache config.) I don't want anonymous visitors to access any pages other that hitting a message page. I recently found this questioned answered for M$ IIS Server and the answer was to restrict IP and customize 403 error message but Zope is not IIS and there is likely a better way to go. If I simply elevate view permission access to the site to the manager or intermediate manager role(s), this stops view access as it should, but it is not friendly since it does not give visitors any message or indication why they are not able to access the site and of course brings up the login box for anonymous user hitting the site. Regards, David
David Pratt wrote:
What is the best strategy for taking a zope site temporarily offlineso visitors are provided with friendly message while manager (or other intermediate manager roles) can still view.
I build the message as a page template. If you go to: http://example.com/a_page_template/x/y/z it doesn't matter what x, y and z are, the page template will still get called and rendered, which is exactly what you want here. I then use the rename form to rename the original site folder out the way and replace it with the page template. Bu ticking both the template and the site folder before hitting the rename button, they both get renamed in one transaction, so there's no possibility of people getting a 404, even on high-volume sites. cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
David Pratt wrote at 2005-2-18 01:10 -0400:
What is the best strategy for taking a zope site temporarily offlineso
We are using an Apache Redirect for this (in a rewrite rule). (We use Apache as front end to Zope). -- Dieter
participants (4)
-
Anton Stonor -
Chris Withers -
David Pratt -
Dieter Maurer