You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The modules available in TAL expressions only contain already imported modules while the reference implementation will import modules that aren't yet in sys.modules. Here's the TB I get under Chameleon that I don't get without::
KeyError: 'webcouturier.dropdownmenu.utils'
- Expression: "python:modules['webcouturier.dropdownmenu.utils']"
- Filename: .../src/webcouturier.dropdownmenu/webcouturier/dropdownmenu/browser/dropdown_recurse.pt
- Location: (9:22)
- Source: ... e="utils python:modules['webcouturier.dropdownmenu.utils'];
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Arguments: repeat: {...} (0)
context: <ImplicitAcquisitionWrapper departments at 0xf2685a4>
views: <ViewMapper - at 0xe326ecc>
modules: <instance - at 0xa50feec>
bottomLevel: 0
args: <tuple - at 0xb77ea02cL>
here: <ImplicitAcquisitionWrapper departments at 0xf2685a4>
user: <ImplicitAcquisitionWrapper - at 0xe6b1a7c>
nothing: <NoneType - at 0x81904d8>
children: <list - at 0xf0b7acc>
traverse_subpath: <list - at 0xe504f2c>
convert: <function translate at 0xf28172c>
container: <ImplicitAcquisitionWrapper departments at 0xf2685a4>
normalizeString: <instancemethod normalizeString at 0xf2ee5cc>
level: 1
default: <object - at 0xb78096f0L>
request: <instance - at 0xe849bac>
wrapped_repeat: <SafeMapping - at 0xf2ee194>
decode: <function decode at 0xf28164c>
template: <ViewPageTemplateFile - at 0xcf2114c>
translate: <function translate at 0xf28172c>
root: <ImplicitAcquisitionWrapper Zope at 0xce4beb4>
options: {...} (3)
loop: {...} (0)
view: <DropdownMenuViewlet plone.global_sections at 0xe87a2cc>
- Expression: "python:view.getTabObject(tabUrl = tab['url'], tabPath = tab.get('path'))"
- Filename: .../src/webcouturier.dropdownmenu/webcouturier/dropdownmenu/browser/dropdown_sections.pt
- Location: (9:43)
- Source: ... python:view.getTabObject(tabUrl = tab['url'], tabPath = tab.get('path')) ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Arguments: repeat: {...} (0)
context: <ImplicitAcquisitionWrapper departments at 0xf2685a4>
views: <ViewMapper - at 0xd46af4c>
modules: <instance - at 0xa50feec>
args: <tuple - at 0xb77ea02cL>
here: <ImplicitAcquisitionWrapper departments at 0xf2685a4>
user: <ImplicitAcquisitionWrapper - at 0xe6b1a7c>
tab: {...} (4)
nothing: <NoneType - at 0x81904d8>
traverse_subpath: <list - at 0xe9aa44c>
convert: <function translate at 0xf2818ec>
container: <ImplicitAcquisitionWrapper departments at 0xf2685a4>
default: <object - at 0xb78096f0L>
request: <instance - at 0xe849bac>
wrapped_repeat: <SafeMapping - at 0xf27ed24>
decode: <function decode at 0xf281924>
template: <ViewPageTemplateFile - at 0xcf2110c>
view: <DropdownMenuViewlet plone.global_sections at 0xe87a2cc>
translate: <function translate at 0xf2818ec>
root: <ImplicitAcquisitionWrapper Zope at 0xce4beb4>
options: {...} (0)
loop: {...} (1)
attrs: {...} (1)
- Expression: "provider:plone.portalheader"
- Filename: /usr/local/lib/python/site-packages/plone.app.layout-2.1.8-py2.7.egg/plone/app/layout/viewlets/portal_header.pt
- Location: (2:32)
- Source: ... :replace="structure provider:plone.portalheader" />
^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Arguments: repeat: {...} (0)
context: <ImplicitAcquisitionWrapper departments at 0xf2685a4>
views: <ViewMapper - at 0xea2c6ac>
modules: <instance - at 0xa50feec>
args: <tuple - at 0xb77ea02cL>
here: <ImplicitAcquisitionWrapper departments at 0xf2685a4>
user: <ImplicitAcquisitionWrapper - at 0xe6b1a7c>
nothing: <NoneType - at 0x81904d8>
traverse_subpath: <list - at 0xe2c934c>
convert: <function translate at 0xf473df4>
container: <ImplicitAcquisitionWrapper departments at 0xf2685a4>
default: <Placeholder - at 0xd80984c>
request: <instance - at 0xe849bac>
wrapped_repeat: <SafeMapping - at 0xf040e3c>
decode: <function decode at 0xf473e2c>
template: <ViewPageTemplateFile - at 0xcb4152c>
view: <SimpleViewletClass from /usr/local/lib/python/site-packages/plone.app.layout-2.1.8-py2.7.egg/plone/app/layout/viewlets/portal_header.pt plone.header at 0xe9ae86c>
translate: <function translate at 0xf473df4>
root: <ImplicitAcquisitionWrapper Zope at 0xce4beb4>
options: {...} (0)
loop: {...} (0)
attrs: {...} (1)
- Expression: "provider:plone.portaltop"
- Filename: <string>
- Location: (68:40)
- Arguments: repeat: {...} (0)
template: <ImplicitAcquisitionWrapper folder_listing at 0xe309824>
modules: <instance - at 0xa50feec>
here: <ImplicitAcquisitionWrapper departments at 0xf2685a4>
user: <ImplicitAcquisitionWrapper - at 0xe6b1a7c>
nothing: <NoneType - at 0x81904d8>
traverse_subpath: <list - at 0xea290ac>
convert: <function translate at 0xf28d844>
container: <ImplicitAcquisitionWrapper plone at 0xf268644>
default: <object - at 0xb78096f0L>
request: <instance - at 0xe849bac>
wrapped_repeat: <SafeMapping - at 0xe6b1f04>
decode: <function decode at 0xf28de64>
context: <ImplicitAcquisitionWrapper departments at 0xf2685a4>
translate: <function translate at 0xf28d844>
root: <ImplicitAcquisitionWrapper Zope at 0xce4beb4>
options: {...} (1)
loop: {...} (0)
For example, this works fine under chameleon if I just do "import webcouturier.dropdownmenu.utils" sometime before the template is rendered.
The text was updated successfully, but these errors were encountered:
The modules available in TAL expressions only contain already imported modules while the reference implementation will import modules that aren't yet in sys.modules. Here's the TB I get under Chameleon that I don't get without::
For example, this works fine under chameleon if I just do "import webcouturier.dropdownmenu.utils" sometime before the template is rendered.
The text was updated successfully, but these errors were encountered: