Re: [Zope] VIRTUAL_URL Failure
> (2) Does anyone know how to debug VirtualHostMonster or other Python > libraries while running a Zope instance (it lives in Python not in > Zope, so I don't know if I change the code there if those changes will > actually get executed)? Oh wait it is in a Zope product, scratch that. Peace, George ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] VIRTUAL_URL Failure
Two main questions: (1) Does anybody *have* good documentation on VIRTUAL_URL and how it interacts with CookieCrumbler and VirtualHostMonster? (2) Does anyone know how to debug VirtualHostMonster or other Python libraries while running a Zope instance (it lives in Python not in Zope, so I don't know if I change the code there if those changes will actually get executed)? For people who care to read more about what I think is going on: > Well, where is VIRTUAL_URL documented? Why doesn't Plohn do something > sane if it's not there? It's not Plone's issue from what I can tell. CookieCrumbler, which lives in CMF, does do something sane if VIRTUAL_URL is not there -- it tries to create a substitute URL. VIRTUAL_URL is set by the VirtualHostMonster. Does anyone know how to debug it? Because it is in the python directories used to build Zope, not in a Zope product which I know how to debug. (Is there a way to restart python to register changes in VirtualHostMonster.py)? Here is what I can tell of what is going on: (1) VIRTUAL_URL is supposed to return the actual URL when there is a Virtual Hosting Monster, for instance http://subdomain.mydomain.org instead of http://ip:port/path/to/subdomain/object or http://mydomain.org/path/to/subdomain/object. (2) There's an Apache rewrite rule set to transform URL requests like http://subdomain.org to http://ip:port/VirtualHostBase/http/subdomain.mydomain.org before they get sent into Zope. (3) When VirtualHostMonster receives a request like http://ip:port/VirtualHostBase/http/subdomain.mydomain.org, it is supposed to return the currect object at http://ip:port/path/to/subdomain/object and set a variable VIRTUAL_URL http://subdomain.mydomain.org in the REQUEST variable. (4) When navigating to an authenticated-only page, CMFCore's CookieCrumbler sets a "came_from" variable to remember where to go. To set the "came_from" variable, it first looks for VIRTUAL_URL. If it doesn't find it, it uses another method to set "came_from" -- but this returns an URL, and one that does not work. (5) During login in Plone to a authenticated-only page, it uses CMFCore's CookieCrumbler came_from variable. > > > I'm wondering if CookieCrumbler is supposed > > to set VIRTUAL_URL given that there's a VHM installed and doesn't? > > It's probably some code in the publisher or vhm. Maybe it's something > that didn't get merged from a branch or the trunk. > > Your best bet is to come up with minimal (ie: no plone, no cookie > crumbler, etc) way to reproduce this and file a bug report in the collector. > > Oh, and grab yourself a copy of grep and see where this should be > defined ;-) > > cheers, > > Chris > > -- > Simplistix - Content Management, Zope & Python Consulting > - http://www.simplistix.co.uk > > ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] VIRTUAL_URL Failure
George Lee wrote: http://my.domain.org/VirtualHostBase/http/my.domain.org:80/contentPages which does not work. Plone folks suspected this was a Zope problem. Oh really? ;-) When Plone sets the came_from, it draws on the REQUEST variable. It first looks to see if there is a VIRTUAL_URL in the REQUEST variable, but it doesn't find one. Well, where is VIRTUAL_URL documented? Why doesn't Plohn do something sane if it's not there? I'm wondering if CookieCrumbler is supposed to set VIRTUAL_URL given that there's a VHM installed and doesn't? It's probably some code in the publisher or vhm. Maybe it's something that didn't get merged from a branch or the trunk. Your best bet is to come up with minimal (ie: no plone, no cookie crumbler, etc) way to reproduce this and file a bug report in the collector. Oh, and grab yourself a copy of grep and see where this should be defined ;-) cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] VIRTUAL_URL Failure
Zope 2.8.1 In Plone 2.1.1, when I try to access a page Anonymous does not have permission to see, it redirects to a login. While doing so, it sets a came_from variable with the URL I'm trying to access. It sets an ugly http://my.domain.org/VirtualHostBase/http/my.domain.org:80/contentPages which does not work. Plone folks suspected this was a Zope problem. When Plone sets the came_from, it draws on the REQUEST variable. It first looks to see if there is a VIRTUAL_URL in the REQUEST variable, but it doesn't find one. I'm wondering if CookieCrumbler is supposed to set VIRTUAL_URL given that there's a VHM installed and doesn't? Peace, George Peace, George On 11/8/05, Chris Withers <[EMAIL PROTECTED]> wrote: > George Lee wrote: > > On my Plone site, in CookieCrumbler.py, VIRTUAL_URL is not found in > > the request variable even though I have a Virtual Host Monster. This > > means that when logging in, the "came_from" URL that my site directs > > to becomes something ugly like > > What version of Zope are you using? > > Why do you think VIRTUAL_URL should be there? > > cheers, > > Chris > > -- > Simplistix - Content Management, Zope & Python Consulting > - http://www.simplistix.co.uk > ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] VIRTUAL_URL Failure
George Lee wrote: On my Plone site, in CookieCrumbler.py, VIRTUAL_URL is not found in the request variable even though I have a Virtual Host Monster. This means that when logging in, the "came_from" URL that my site directs to becomes something ugly like What version of Zope are you using? Why do you think VIRTUAL_URL should be there? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] VIRTUAL_URL Failure
Hi, On my Plone site, in CookieCrumbler.py, VIRTUAL_URL is not found in the request variable even though I have a Virtual Host Monster. This means that when logging in, the "came_from" URL that my site directs to becomes something ugly like http://my.domain.org/VirtualHostBase/http/my.domain.org:80/contentPages This doesn't seem to be an Apache rewriting issue. Should VIRTUAL_URL be found in the request variable and giving the right URL (http://my.domain.org/contentPages), and why isn't it showing up? Peace, George ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )