[Zope] breadcrumbs ques - addendum
AM
list_subscriber@neurobs.com
Mon, 23 Sep 2002 11:01:59 -0700
If I copy the same three lines into a PyScript at /
url = context.getPhysicalRoot().absolute_url()
print url
return printed
I get the :
Error Type: Unauthorized
Error Value: You are not allowed to access getPhysicalRoot in this context
Traceback (innermost last):
File /var/local/zope/leonardo/lib/python/ZPublisher/Publish.py, line 150, in publish_module
File /var/local/zope/leonardo/lib/python/ZPublisher/Publish.py, line 114, in publish
File /var/local/zope/leonardo/lib/python/Zope/__init__.py, line 159, in zpublisher_exception_hook
(Object: Zope)
File /var/local/zope/leonardo/lib/python/ZPublisher/Publish.py, line 98, in publish
File /var/local/zope/leonardo/lib/python/ZPublisher/mapply.py, line 88, in mapply
(Object: gen_nav_list)
File /var/local/zope/leonardo/lib/python/ZPublisher/Publish.py, line 39, in call_object
(Object: gen_nav_list)
File /var/local/zope/leonardo/lib/python/Shared/DC/Scripts/Bindings.py, line 252, in __call__
(Object: gen_nav_list)
File /var/local/zope/leonardo/lib/python/Shared/DC/Scripts/Bindings.py, line 283, in _bindAndExec
(Object: gen_nav_list)
File /var/local/zope/leonardo/lib/python/Products/PythonScripts/PythonScript.py, line 302, in _exec
(Object: gen_nav_list)
(Info: ({'script': <PythonScript instance at 8ad5810>, 'context': <Application instance at 8c7aa58>, 'container': <Application instance at 8c7aa58>, 'traverse_subpath': []}, (), {}, None))
File Script (Python), line 3, in gen_nav_list
File /var/local/zope/leonardo/lib/python/AccessControl/ZopeGuards.py, line 58, in guarded_getattr
(Object: Zope)
File /var/local/zope/leonardo/lib/python/AccessControl/ZopeGuards.py, line 40, in aq_validate
(Object: Zope)
File /var/local/zope/leonardo/lib/python/AccessControl/SecurityManager.py, line 83, in validate
File /var/local/zope/leonardo/lib/python/AccessControl/ZopeSecurityPolicy.py, line 177, in validate
Unauthorized: (see above)
Why of Why??
TIA
AM
Chris Withers wrote:
> AM wrote:
>
>> well the script & dtml method that you provided I copied into a
>> directory /site/layout
>> In the same directory I have another method that calls the dtml
>> method(yours)
>
>
> Why this setup? Why not just include the DTML of my method in your
> method? How are you calling my method from your method?
>
>> and finally all over the site dtml documents call the dtml method
>> that calls the dtml method that calls the python script.... :)
>
>
> How is this calling done?
>
>> However The same errors are generated when I press the test tab on
>> the script page. or the I try to view the dtml method that you provided
>
>
> weird, sorry, out of luck :-(
>
> Chris
>
>
> .
>
--
==================================================================
Aseem Mohanty
Neurobehavioral Systems Inc, 828 San Pablo Ave, Albany, CA 94706
(R) 510 7696011 (M) 510 3014871 (O) 510 5279231
==================================================================
"I saw `cout' being shifted "Hello world" times to the left and
stopped right there!!" -- Steve Gonedes
==================================================================