Chris Withers wrote at 2008-10-2 08:13 +0100:
>I've tried this on Zope 2.8-2.11.1 and it behaves the same on all but
>feels like a bug. I wonder if anyone else agrees or, better yet, knows
>what's going on here...
>So, add a Script (Python) called test in the root on a Zope instance
>running on port 8080 and in it put:
>Now go to:
>['x', 'y', 'z']
>...which makes sense.
>Now, if you have a VHM called virtual_hosting (as it normally is) if you
>...you'll now get:
>['virtual_hosting', '/', 'x', 'y', 'z']
>...which doesn't seem right to me.
>Worse yet, if you go to:
>['virtual_hosting', '/something', 'x', 'y', 'z']
>Anyone got any ideas as to what's going on here?
It is very strange that you want to define a Python Script as
root of your site. This use case is simple not supported.
What you see are implementation artifacts (in your not supported use case):
A "Script (Python)" (among other types) stops traversal and
makes the remaining traversal steps available in "traverse_subpath".
A VHM needs to get control twice -- once to set things up
and once to set the virtual root.
It ensures to get control the second time by adding additional traversal
Usually, i.e. when the traversal steps leading to the root behave
"normally", this works fine.
But, if someone places objects with unusual traversal behaviour
on the way to the virtual root (such as a "Script (Python)"),
it may not work.
Zope maillist - Zope@zope.org
** No cross posts or HTML encoding! **
(Related lists -