[Zope-CMF] Solution -- Re: VIRTUAL_URL and ACTUAL_URL
George Lee
georgeleejr at gmail.com
Sun Jan 22 14:21:39 EST 2006
A month and a half ago I wrote this list with a question about
REQUEST['VIRTUAL_URL'], which Plone / CMF used to determine the 'came_from'
variable on the login page. (When an anonymous user attempts to view a page that
requires a login, Plone / CMF / CookieCrumbler sets 'came_from' to remember
where to redirect the user after the login).
In my Virtual Hosting setup, 'VIRTUAL_URL' was not being set, and 'came_from'
was set incorrectly.
It turns out that the error was that my hosting company had set up an enhanced
VirtualHostMonster using http://www.zope.org/Members/sfm/SiteAccessEnhanced/
that makes it easier to map domains to directories. However, this product is
outdated and does not set the 'VIRTUAL_URL'.
Some lessons learned:
(1) Even if you have a product somewhere like
"~/lib/python/Products/SiteAccess", it may not be the one actually used by your
instance. In my case, the updated VirtualHostMonster and SiteAccess was
overridden by the customized VirtualHostMonster and SiteAccess at
"~/instance1/Products/SiteAccess". This conflit also shows up in the Zope log if
you take a look at it.
(2) Using a python debugger is helpful! See
http://plone.org/documentation/how-to/using_pdb and
http://plone.org/documentation/tutorial/best-practices/debugging-plone for some
on debugging in Plone.
Peace,
George
More information about the Zope-CMF
mailing list