#141 — Plone 2.5.3 --> listActionInfos() got an unexpected keyword argument 'categories'
| State | Resolved |
|---|---|
| Version: | 1.1.2 |
| Area | User interface |
| Issue type | Bug |
| Severity | Medium |
| Submitted by | Israel Saeta Perez |
| Submitted on | Aug 20, 2008 |
| Responsible | Ricardo Newbery |
| Target release: | 1.2.1 |
Last modified on
Mar 06, 2009
by
Ricardo Newbery
I've installed CacheFu 1.2 and Plone 2.5.3 in my instance and I get
the following error everytime I click the "policies", "rules" or
"headers" configuration tabs for the Cache Configuration Tool in the
Plone Site Configuration control panel:
TypeError: listActionInfos() got an unexpected keyword argument 'categories'
(full traceback at the end)
but the "main" and "memory" tabs work fine. CacheFu 1.1.2 doesn't work either.
I've grepped the definition of the "listActionInfos" function in the
Plone and CMF source code and I've found that in Plone 2.5.3 (and in
2.5.5 too) it is:
#CMFCore/ActionProviderBase.py
def listActionInfos(self, action_chain=None, object=None,
check_visibility=1, check_permissions=1,
check_condition=1, max=-1)
and in Plone 3:
#CMFPlone/ActionsTool.py
def listActionInfos(self, action_chain=None, object=None,
check_visibility=1, check_permissions=1,
check_condition=1, max=-1,
categories=None, ignore_categories=None)
The CacheFu code that raises this exception is:
#CacheSetup/skins/cache-setup/getFolderButtons.py
button_actions = portal_actions.listActionInfos(object=context,
categories=('folder_buttons', ))
So I think I've stumbled upon a bug.
FULL TRACEBACK:
2008-08-20 16:17:48 ERROR Zope.SiteErrorLog http://mysite.com:8080/[…]/cache_policy_config
Traceback (innermost last):
Module ZPublisher.Publish, line 115, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 41, in call_object
Module Products.CMFFormController.FSControllerPageTemplate, line 90, in __call__
Module Products.CMFFormController.BaseControllerPageTemplate, line 31, in _call
Module Shared.DC.Scripts.Bindings, line 311, in __call__
Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
Module Products.CMFCore.FSPageTemplate, line 195, in _exec
Module Products.CacheSetup.patch_cmf, line 28, in FSPT_pt_render
Module Products.CacheSetup.patch_utils, line 9, in call_pattern
Module Products.CMFCore.FSPageTemplate, line 134, in pt_render
Module Products.CacheSetup.patch_cmf, line 74, in PT_pt_render
Module Products.CacheSetup.patch_utils, line 9, in call_pattern
Module Products.PageTemplates.PageTemplate, line 104, in pt_render
- <FSControllerPageTemplate at /myportal/cache_policy_config used for /myportal/portal_cache_settings>
Module TAL.TALInterpreter, line 238, in __call__
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 749, in do_useMacro
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 457, in do_optTag_tal
Module TAL.TALInterpreter, line 442, in do_optTag
Module TAL.TALInterpreter, line 437, in no_tag
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 749, in do_useMacro
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 457, in do_optTag_tal
Module TAL.TALInterpreter, line 442, in do_optTag
Module TAL.TALInterpreter, line 437, in no_tag
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 772, in do_defineSlot
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 457, in do_optTag_tal
Module TAL.TALInterpreter, line 442, in do_optTag
Module TAL.TALInterpreter, line 437, in no_tag
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 772, in do_defineSlot
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 715, in do_condition
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 457, in do_optTag_tal
Module TAL.TALInterpreter, line 442, in do_optTag
Module TAL.TALInterpreter, line 437, in no_tag
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 507, in do_setLocal_tal
Module Products.PageTemplates.TALES, line 221, in evaluate
- URL: file:CacheSetup/skins/cache_setup/cache_policy_config.cpt
- Line 35, Column 8
- Expression: <PythonExpr here.getFolderButtons(actions)>
- Names:
{'container': <PloneSite at /myportal>,
'context': <CacheTool at /myportal/portal_cache_settings>,
'default': <Products.PageTemplates.TALES.Default instance at 0xb71397ec>,
'here': <CacheTool at /myportal/portal_cache_settings>,
'loop': <Products.PageTemplates.TALES.SafeMapping object at 0xaf8209ec>,
'modules': <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at 0xb70e408c>,
'nothing': None,
'options': {'args': (),
'state': <Products.CMFFormController.ControllerState.ControllerState object at 0xb025e78c>},
'repeat': <Products.PageTemplates.TALES.SafeMapping object at 0xaf8209ec>,
'request': <HTTPRequest, URL=http://mysite.com:8080/[…]/cache_policy_config>,
'root': <Application at >,
'template': <FSControllerPageTemplate at /myportal/cache_policy_config used for /myportal/portal_cache_settings>,
'traverse_subpath': [],
'user': <User 'admin'>}
Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__
- __traceback_info__: here.getFolderButtons(actions)
Module Python expression "here.getFolderButtons(actions)", line 1, in <expression>
Module Products.CMFCore.FSPythonScript, line 108, in __call__
Module Shared.DC.Scripts.Bindings, line 311, in __call__
Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
Module Products.CMFCore.FSPythonScript, line 164, in _exec
Module None, line 9, in getFolderButtons
- <FSPythonScript at /myportal/getFolderButtons used for /myportal/portal_cache_settings>
- Line 9
TypeError: listActionInfos() got an unexpected keyword argument 'categories'
the following error everytime I click the "policies", "rules" or
"headers" configuration tabs for the Cache Configuration Tool in the
Plone Site Configuration control panel:
TypeError: listActionInfos() got an unexpected keyword argument 'categories'
(full traceback at the end)
but the "main" and "memory" tabs work fine. CacheFu 1.1.2 doesn't work either.
I've grepped the definition of the "listActionInfos" function in the
Plone and CMF source code and I've found that in Plone 2.5.3 (and in
2.5.5 too) it is:
#CMFCore/ActionProviderBase.py
def listActionInfos(self, action_chain=None, object=None,
check_visibility=1, check_permissions=1,
check_condition=1, max=-1)
and in Plone 3:
#CMFPlone/ActionsTool.py
def listActionInfos(self, action_chain=None, object=None,
check_visibility=1, check_permissions=1,
check_condition=1, max=-1,
categories=None, ignore_categories=None)
The CacheFu code that raises this exception is:
#CacheSetup/skins/cache-setup/getFolderButtons.py
button_actions = portal_actions.listActionInfos(object=context,
categories=('folder_buttons', ))
So I think I've stumbled upon a bug.
FULL TRACEBACK:
2008-08-20 16:17:48 ERROR Zope.SiteErrorLog http://mysite.com:8080/[…]/cache_policy_config
Traceback (innermost last):
Module ZPublisher.Publish, line 115, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 41, in call_object
Module Products.CMFFormController.FSControllerPageTemplate, line 90, in __call__
Module Products.CMFFormController.BaseControllerPageTemplate, line 31, in _call
Module Shared.DC.Scripts.Bindings, line 311, in __call__
Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
Module Products.CMFCore.FSPageTemplate, line 195, in _exec
Module Products.CacheSetup.patch_cmf, line 28, in FSPT_pt_render
Module Products.CacheSetup.patch_utils, line 9, in call_pattern
Module Products.CMFCore.FSPageTemplate, line 134, in pt_render
Module Products.CacheSetup.patch_cmf, line 74, in PT_pt_render
Module Products.CacheSetup.patch_utils, line 9, in call_pattern
Module Products.PageTemplates.PageTemplate, line 104, in pt_render
- <FSControllerPageTemplate at /myportal/cache_policy_config used for /myportal/portal_cache_settings>
Module TAL.TALInterpreter, line 238, in __call__
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 749, in do_useMacro
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 457, in do_optTag_tal
Module TAL.TALInterpreter, line 442, in do_optTag
Module TAL.TALInterpreter, line 437, in no_tag
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 749, in do_useMacro
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 457, in do_optTag_tal
Module TAL.TALInterpreter, line 442, in do_optTag
Module TAL.TALInterpreter, line 437, in no_tag
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 772, in do_defineSlot
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 457, in do_optTag_tal
Module TAL.TALInterpreter, line 442, in do_optTag
Module TAL.TALInterpreter, line 437, in no_tag
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 772, in do_defineSlot
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 715, in do_condition
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 457, in do_optTag_tal
Module TAL.TALInterpreter, line 442, in do_optTag
Module TAL.TALInterpreter, line 437, in no_tag
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 507, in do_setLocal_tal
Module Products.PageTemplates.TALES, line 221, in evaluate
- URL: file:CacheSetup/skins/cache_setup/cache_policy_config.cpt
- Line 35, Column 8
- Expression: <PythonExpr here.getFolderButtons(actions)>
- Names:
{'container': <PloneSite at /myportal>,
'context': <CacheTool at /myportal/portal_cache_settings>,
'default': <Products.PageTemplates.TALES.Default instance at 0xb71397ec>,
'here': <CacheTool at /myportal/portal_cache_settings>,
'loop': <Products.PageTemplates.TALES.SafeMapping object at 0xaf8209ec>,
'modules': <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at 0xb70e408c>,
'nothing': None,
'options': {'args': (),
'state': <Products.CMFFormController.ControllerState.ControllerState object at 0xb025e78c>},
'repeat': <Products.PageTemplates.TALES.SafeMapping object at 0xaf8209ec>,
'request': <HTTPRequest, URL=http://mysite.com:8080/[…]/cache_policy_config>,
'root': <Application at >,
'template': <FSControllerPageTemplate at /myportal/cache_policy_config used for /myportal/portal_cache_settings>,
'traverse_subpath': [],
'user': <User 'admin'>}
Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__
- __traceback_info__: here.getFolderButtons(actions)
Module Python expression "here.getFolderButtons(actions)", line 1, in <expression>
Module Products.CMFCore.FSPythonScript, line 108, in __call__
Module Shared.DC.Scripts.Bindings, line 311, in __call__
Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
Module Products.CMFCore.FSPythonScript, line 164, in _exec
Module None, line 9, in getFolderButtons
- <FSPythonScript at /myportal/getFolderButtons used for /myportal/portal_cache_settings>
- Line 9
TypeError: listActionInfos() got an unexpected keyword argument 'categories'
- Steps to reproduce:
- * Install Plone-2.5 and CacheFu-1.1.2.
* Login as a Manager user in Plone.
* Go to the Plone Control Panel → Cache Configuration Tool.
* Select one of the tabs "policies", "rules" or "headers".
Added byRicardo NewberyonMar 06, 2009 05:41 PM
This is actually more a problem with your site config. Remove or hide all the folder_buttons actions and it sort of makes the folder_contents view pretty much useless except in the portal root. Go into /portal_actions/manage_editActionsForm in the ZMI to fix this.
Issue state:
Unconfirmed
→
Resolved
Responsible manager:
(UNASSIGNED)
→
newbery
Target release:
None
→
1.2.1
But I agree that CacheSetup shouldn't throw an error just because the site config is weird. Fixed in svn trunk... http://dev.plone.org/collective/changeset/81814
No responses can be added.
If you can, please log in before submitting a reaction.