[Setup] AttributeError: getLocallyAllowedTypes after upgrading from 3.0 to 4.1

Dominik Ruf dominikruf at gmail.com
Fri Sep 2 12:26:14 UTC 2011


Hi,

I tried to upgrade an old plone site from 3.0 to 4.1.
Now I realized that when I try to open some folders in 4.1 I get this 
exception
But it doesn't happen on every folder.

2011-09-02 14:02:41 ERROR Zope.SiteErrorLog 1314964961.330.145526389272 
http://localhost:8080/my_db/mysite/myfolder/folder_listing
Traceback (innermost last):
  Module ZPublisher.Publish, line 126, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 46, in call_object
  Module Shared.DC.Scripts.Bindings, line 322, in __call__
  Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
  Module Products.CMFCore.FSPageTemplate, line 240, in _exec
  Module Products.CMFCore.FSPageTemplate, line 180, in pt_render
  Module Products.PageTemplates.PageTemplate, line 79, in pt_render
  Module zope.pagetemplate.pagetemplate, line 113, in pt_render
  Module zope.tal.talinterpreter, line 271, in __call__
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 888, in do_useMacro
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 954, in do_defineSlot
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 858, in do_defineMacro
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 852, in do_condition
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 742, in do_insertStructure_tal
  Module Products.PageTemplates.Expressions, line 218, in evaluateStructure
  Module zope.tales.tales, line 696, in evaluate
   - URL: 
file:/usr/local/Plone/buildout-cache/eggs/plonetheme.sunburst-1.1.5-py2.6.egg/plonetheme/sunburst/skins/sunburst_templates/main_template.pt
   - Line 82, Column 20
   - Expression: <StringExpr u'plone.contentviews'>
   - Names:
      {'container': <PloneSite at /my_db/mysite>,
       'context': <ATFolder at /my_db/mysite/myfolder>,
       'default': <object object at 0xb78bd7b8>,
       'here': <ATFolder at /my_db/mysite/myfolder>,
       'loop': {},
       'nothing': None,
       'options': {'args': ()},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 
0xf40d644>,
       'request': <HTTPRequest, 
URL=http://localhost:8080/my_db/mysite/myfolder/folder_listing>,
       'root': <Application at >,
       'template': <FSPageTemplate at /my_db/mysite/folder_listing used for 
/my_db/mysite/myfolder>,
       'traverse_subpath': [],
       'user': <User 'admin'>}
  Module zope.contentprovider.tales, line 80, in __call__
  Module plone.app.viewletmanager.manager, line 154, in render
  Module plone.app.viewletmanager.manager, line 85, in render
  Module plone.app.layout.viewlets.common, line 48, in render
  Module Products.Five.browser.pagetemplatefile, line 125, in __call__
  Module Products.Five.browser.pagetemplatefile, line 59, in __call__
  Module zope.pagetemplate.pagetemplate, line 113, in pt_render
  Module zope.tal.talinterpreter, line 271, in __call__
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 852, in do_condition
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 531, in do_optTag_tal
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 742, in do_insertStructure_tal
  Module Products.PageTemplates.Expressions, line 218, in evaluateStructure
  Module zope.tales.tales, line 696, in evaluate
   - URL: 
/usr/local/Plone/buildout-cache/eggs/plone.app.layout-2.1.8-py2.6.egg/plone/app/layout/viewlets/contentactions.pt
   - Line 32, Column 8
   - Expression: <StringExpr u'plone.contentmenu'>
   - Names:
      {'args': (),
       'container': <ATFolder at /my_db/mysite/myfolder>,
       'context': <ATFolder at /my_db/mysite/myfolder>,
       'default': <object object at 0xb78bd7b8>,
       'here': <ATFolder at /my_db/mysite/myfolder>,
       'loop': {},
       'nothing': None,
       'options': {},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 
0xf0b389c>,
       'request': <HTTPRequest, 
URL=http://localhost:8080/my_db/mysite/myfolder/folder_listing>,
       'root': <Application at >,
       'template': 
<Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 
0xbd6efcc>,
       'traverse_subpath': [],
       'user': <User 'admin'>,
       'view': <Products.Five.viewlet.metaconfigure.ContentActionsViewlet 
object at 0xf232aec>,
       'views': <Products.Five.browser.pagetemplatefile.ViewMapper object at 
0xf232d4c>}
  Module zope.contentprovider.tales, line 80, in __call__
  Module plone.app.contentmenu.view, line 25, in render
  Module Products.Five.browser.pagetemplatefile, line 125, in __call__
  Module Products.Five.browser.pagetemplatefile, line 59, in __call__
  Module zope.pagetemplate.pagetemplate, line 113, in pt_render
  Module zope.tal.talinterpreter, line 271, in __call__
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 583, in do_setLocal_tal
  Module zope.tales.tales, line 696, in evaluate
   - URL: 
/usr/local/Plone/buildout-cache/eggs/plone.app.contentmenu-2.0.4-py2.6.egg/plone/app/contentmenu/contentmenu.pt
   - Line 1, Column 0
   - Expression: <PathExpr standard:u'view/menu'>
   - Names:
      {'args': (),
       'container': <ATFolder at /my_db/mysite/myfolder>,
       'context': <ATFolder at /my_db/mysite/myfolder>,
       'default': <object object at 0xb78bd7b8>,
       'here': <ATFolder at /my_db/mysite/myfolder>,
       'loop': {},
       'nothing': None,
       'options': {},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 
0xf0b38c4>,
       'request': <HTTPRequest, 
URL=http://localhost:8080/my_db/mysite/myfolder/folder_listing>,
       'root': <Application at >,
       'template': 
<Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 
0xbcf4ccc>,
       'traverse_subpath': [],
       'user': <User 'admin'>,
       'view': <plone.app.contentmenu.view.ContentMenuProvider object at 
0xf077b0c>,
       'views': <Products.Five.browser.pagetemplatefile.ViewMapper object at 
0xf07782c>}
  Module zope.tales.expressions, line 217, in __call__
  Module Products.PageTemplates.Expressions, line 155, in _eval
  Module Products.PageTemplates.Expressions, line 117, in render
  Module plone.app.contentmenu.view, line 34, in menu
  Module zope.browsermenu.menu, line 53, in getMenuItems
  Module plone.app.contentmenu.menu, line 420, in available
  Module plone.memoize.instance, line 51, in memogetter
  Module plone.app.contentmenu.menu, line 439, in _itemsToAdd
  Module plone.app.contentmenu.menu, line 442, in _addableTypesInContext
  Module plone.memoize.request, line 42, in memogetter
  Module plone.app.content.browser.folderfactories, line 19, in 
_allowedTypes
  Module Products.ATContentTypes.lib.constraintypes, line 250, in 
allowedContentTypes
AttributeError: getLocallyAllowedTypes

What I already found out is that on the exception throwing folders when I 
open
http://localhost:8080/my_db/mysite/myfolder/folder_constraintypes_form
in the 3.0 version none of the 2 radio buttons is selected (which seems to 
be wrong to say the least). 
Originally the site started as a plone 2.5 site. I guess the mistake 
happened during the upgrade from 2.5 to 3.0.

The question now is how can I fix this?
Can somebody for example give me a hint how to set this "constraintypes 
property" on all the folders on my site?
I think that should fix the problem.
Or is there a better way?

cheers
Dominik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plone.org/pipermail/plone-setup/attachments/20110902/d9d1cc31/attachment.html>


More information about the Setup mailing list