RE: SiteAccess breaks ZDConfera
Please send me the patch. The problem does not seem to have anything to do with URLs, but rather the objects indexed by the topic -- but I could be wrong here. Is there a way to modify ZDConfera/ZDiscussions to fix the problem, without patching ZPublisher? I wouldn't want to break something else in the process. -- Alexander Staubo http://alex.mop.no/ The difference between theory and practice is that, in theory, there is no difference between theory and practice.
-----Original Message----- From: Evan Simpson [mailto:evan@digicool.com] Sent: Wednesday, March 22, 2000 10:35 PM To: Alexander Staubo; zope@zope.org Cc: mike@digicool.com Subject: Re: SiteAccess breaks ZDConfera
----- Original Message ----- From: Alexander Staubo <alex@mop.no>
Adding a SiteRoot object to some folder upward from a ZDConfera topic ("Confera Topic" object) will break the topic.
I strongly suspect that this is a symptom of a known (to me) incompatibility between SiteAccess and ZCatalog. If ZDConfera uses a ZCatalog to track topics, it will not be able to retrieve them correctly. I have a patch to ZCatalog to fix this, but it hasn't been tested by anyone but me. It just replaces the resolve_url method of ZCatalog with one that doesn't reenter ZPublisher. If you're willing to test it, I'd be happy to send it.
Cheers,
Evan @ digicool & 4-am
----- Original Message ----- From: Alexander Staubo <alex@mop.no>
Please send me the patch. The problem does not seem to have anything to do with URLs, but rather the objects indexed by the topic -- but I could be wrong here.
Is there a way to modify ZDConfera/ZDiscussions to fix the problem, without patching ZPublisher? I wouldn't want to break something else in the process.
Without patching ZCatalog, you mean? Hmm. Possibly. If ZD* were patched to use a subclass of ZCatalog which overrode resolve_url, that would work. Here's the replacement resolve_url for ZCatalog: def resolve_url(self, path, REQUEST): """ Attempt to resolve a url into an object in the Zope namespace. The url may be absolute (site-relative) or a catalog path style url. If no object is found, None is returned. No exceptions are raised. """ pparts = filter(None, string.split(path, '/')) try: obj = getattr(self.aq_parent, pparts.pop(0)) while pparts: obj = obj[pparts.pop(0)] return obj except: return Cheers, Evan @ digicool & 4-am
Thanks for the patch, evan. However, adding a reply to a Confera message gives this error (with your patch): AttributeError regs <!-- Traceback (innermost last): File /imeme/zope/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /imeme/zope/lib/python/ZPublisher/Publish.py, line 179, in publish File /imeme/zope/lib/python/Zope/__init__.py, line 202, in zpublisher_exception_hook File /imeme/zope/lib/python/ZPublisher/Publish.py, line 165, in publish File /imeme/zope/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: addMessage) File /imeme/zope/lib/python/ZPublisher/Publish.py, line 102, in call_object (Object: addMessage) File lib/python/Products/Confera/Confera.py, line 565, in addMessage File /usr/lib/python1.5/regsub.py, line 38, in gsub AttributeError: (see above) --> Evan Simpson wrote:
Here's the replacement resolve_url for ZCatalog:
def resolve_url(self, path, REQUEST): """ Attempt to resolve a url into an object in the Zope namespace. The url may be absolute (site-relative) or a catalog path style url. If no object is found, None is returned. No exceptions are raised. """ pparts = filter(None, string.split(path, '/')) try: obj = getattr(self.aq_parent, pparts.pop(0)) this is line 565: while pparts: obj = obj[pparts.pop(0)] return obj except: return
-- http://mindlace.net __________________ mindlace@imeme.net I don't want The Truth but I wouldn't mind a Big Analogy.
participants (3)
-
Alexander Staubo -
Evan Simpson -
mindlace