[Setup] help - I meet difficulties to migrate my plone instance 2.1.3 to file system version 2.5.1
Christophe DUFOURD
christophe.dufourd at club-internet.fr
Thu Oct 12 10:05:47 UTC 2006
Hi Plone Team,
My name is Christophe DUFOURD. I'm from Paris.
I'm Grosse Caisse website initiator - indie electro pop rock webtv &
webradio - http://www.grosse-caisse.com/
I've been working with plone for 1 year and a half.
Today, I meet difficulties to migrate my plone instance 2.1.3 to file system
version 2.5.1.
When I click "upgrade" to bring this Plone Zope version up to date with your
file system, I've got the message below :
Starting the migration from version: 2.1.3
Attempting to upgrade from: 2.1.3
Installed CMFPlacefulWorkflow.
Upgrade to: 2.5-alpha1, completed
Attempting to upgrade from: 2.5-alpha1
Upgrade aborted
Error type: exceptions.AttributeError
Error value: 'NoneType' object has no attribute 'setMemberProperties'
File "/home/zope/dev-plone251-gc/Products/CMFPlone/MigrationTool.py", line
307, in upgrade newv, msgs = self._upgrade(newv)
File "/home/zope/dev-plone251-gc/Products/CMFPlone/MigrationTool.py", line
404, in _upgrade res = function(self.aq_parent)
File
"/home/zope/dev-plone251-gc/Products/CMFPlone/migrations/v2_5/alphas.py",
line 24, in alpha1_alpha2 installPlonePAS(portal, out)
File
"/home/zope/dev-plone251-gc/Products/CMFPlone/migrations/v2_5/alphas.py",
line 43, in installPlonePAS installOrReinstallProduct(portal, 'PlonePAS',
out)
File
"/home/zope/dev-plone251-gc/Products/CMFPlone/migrations/migration_util.py",
line 82, in installOrReinstallProduct qi.installProduct(product_name)
File
"/home/zope/dev-plone251-gc/Products/CMFQuickInstallerTool/QuickInstallerToo
l.py", line 322, in installProduct res=install(portal)
File
"/usr/local/zope/zope295/lib/python/Products/ExternalMethod/ExternalMethod.p
y", line 225, in __call__ try: return f(*args, **kw)
File "/home/zope/dev-plone251-gc/Products/PlonePAS/Extensions/Install.py",
line 851, in install restoreUserData(portal, out, userdata)
File "/home/zope/dev-plone251-gc/Products/PlonePAS/Extensions/Install.py",
line 332, in restoreUserData mtool.addMember(*u[:-1])
File "/home/zope/dev-plone251-gc/Products/PlonePAS/tools/membership.py",
line 67, in addMember member.setMemberProperties(properties)
End of upgrade path, migration has finished
The upgrade path did NOT reach current version
Migration has failed
I think I can understand what's wrong.
I can't convert users I created in a python script I personnaly wrote and
which work perfectly in plone 2.1.3/
membership_tool = getToolByName(context, 'portal_membership')
userid = membership_tool.getAuthenticatedMember()
if userid.has_role('Manager'):
# grosse caisse
groupname = context.getId()
grouptitle = context.Title()
group = context.portal_groups.getGroupById(groupname)
if group:
group.setProperties(title=grouptitle)
else:
# Création du groupe
context.portal_groups.addGroup(groupname,)
group = context.portal_groups.getGroupById(groupname)
group.setProperties(name=groupname,title=grouptitle)
# Création du user
username = context.art_login
usr = membership_tool.getMemberById(username)
if usr:
status = ""
else:
password = "grossecaisse"
fullname = context.art_contact_nom
email = "contact at grosse-caisse.com"
status = ""
props = {"username": username, "fullname": fullname, "password":
password, "email": email}
context.portal_registration.addMember(username,password,roles=('Member',),do
mains="",properties=props)
group.addMember(username)
membership_tool.createMemberArea(username)
homeFolder=context.portal_membership.getHomeFolder(username)
# create subfolders agenda, actualite, radio, tv
wf_tool = getToolByName(context, 'portal_workflow')
mygroup = group.id
group_ids = [mygroup]
membership_tool.setLocalRoles(context, group_ids,'Artist')
member_ids = [username]
membership_tool.setLocalRoles(homeFolder, member_ids,'Owner')
...
...
I checked my code carefully and compared it with others examples.
I didn't found anything wrong.
I've spend many days to find a solution with no results.
What is wrong with these users !!
I would like you to help me on this problem.
Thanx very much.
Regards,
Christophe DUFOURD for Grosse Caisse - http://www.grosse-caisse.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plone.org/pipermail/plone-setup/attachments/20061012/aff0c207/attachment-0002.html>
More information about the Setup
mailing list