[Zope] problem with catalog and VHM
Dieter Maurer
dieter@handshake.de
Wed, 2 Apr 2003 20:59:14 +0200
Steffen Hausmann wrote at 2003-4-2 18:05 +0200:
> I'm having trouble with the apache RewriteRule.
>
> I'm using Zope 2.6.0 on a SuSE linux and the following RewriteRule
> works perfect with the site I developed.
>
> RewriteRule ^/(.*) http://127.0.0.1:8070/VirtualHostBase/https/foo.bar:443/VirtualHostRoot/$1 [L,P]
>
> The problem ist, that the folder in which the site is contained in is
> called /brk and I don't want to access the site via foo.bar/brk.
> Therefore I changed the RewriteRule into
>
> [...]/VirtualHostBase/https/foo.bar:443/brk/VirtualHostRoot/$1 [L,P]
>
> This seemed to work until I discovered that parts of the site (which
> use a catalog that is contained in the /brk folder named brkCatalog)
> don't work anymore.
>
> E.g. the funktion manage_afterAdd (which works perfect with the old
> rule) raises an AttributeError.
>
> manage_afterAdd(self, item, container):
> [...]
> self.brkCatalog.reindexIndex('publishDate', REQUEST=None)
>
> AttributeError: 'None' object has no attribute 'script'
Thus, pass in a real "REQUEST" rather than "None".
You can use "self.REQUEST".
Dieter