Hi gleider,
I created a script like this
import transaction
from AccessControl.SecurityManagement import newSecurityManager
portal = getattr(app, "mysite")
# Use Zope application server user database (not plone site)
admin=app.acl_users.getUserById("admin")
newSecurityManager(None, admin)
def fix(context):
try:
for page in context.listFolderContents():
if context.plone_utils.isStructuralFolder(page) and page.Type()
!= u'Collection':
try:
page.getLocallyAllowedTypes()
except AttributeError:
page.setConstrainTypesMode(0)
print page.getId()
if context.plone_utils.isStructuralFolder(page):
fix(page)
except Exception, e:
import traceback
traceback.print_stack()
print 'exception', str(e), str(context)
fix(portal)
transaction.commit()
app._p_jar.sync()
and ran it with ./bin/instance run fixConstrainTypesMode.py
--
View this message in context:
http://plone.293351.n2.nabble.com/AttributeError-getLocallyAllowedTypes-after-upgrading-from-3-0-to-4-1-tp6753699p7559064.html
Sent from the Installation, Setup, Upgrades mailing list archive at Nabble.com.
_______________________________________________
Setup mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/plone-setup