• Remember Mailing List

Re: issues migrating from CMFMember

from Kevin Worth on Mar 05, 2008 05:17 PM
Thanks, that helped out a lot.  I'm still running into a problem.  I  
have 3 cmfmember types.  The default type and 2 custom types.  I can  
"successfully" perform a dry run with the default member type and  
either of the custom types, but not both of them.

My MIGRATION_MAP currently looks like:

MIGRATION_MAP = {
     'Products.remember.content.Member':
             {'atct_newTypeFor': {'portal_type': 'Member',
                                  'meta_type': 'Member'},
              'project_name': PROJECT_NAME,
              'profile': 'profile-remember:default',
              },
     'Products.msewww.people.facultyMember.facultyMember':
             {'atct_newTypeFor': {'portal_type': 'faculty',
                                  'meta_type': 'faculty'},
              'project_name': 'msewww',
              'product': 'msewww',
              },
     'Products.msewww.people.staffMember.staffMember':
             {'atct_newTypeFor': {'portal_type': 'staff',
                                  'meta_type': 'staff'},
              'project_name': 'msewww',
  #            'profile': 'profile-remember:default',
              'product': 'msewww',
              },
     }

If I comment out either the section for the facultyMember or  
staffMember (leaving the other enabled) it works (or, I get no errors.  
I've only don dry runs so I don't know what the outcome looks like)


The error is:

	• Dry run selected.
	• Starting the migration from version: 2.1.2
	• Attempting to upgrade from: 2.1.2
	• Removed vcXMLRPC.js
	• Added icons for copy, cut, paste and delete
	• Upgrade to: 2.1.3-rc1, completed
	• Attempting to upgrade from: 2.1.3-rc1
	• Upgrade to: 2.1.3, completed
	• Attempting to upgrade from: 2.1.3
	• Upgrade to: 2.1.4-rc1, completed
	• Attempting to upgrade from: 2.1.4-rc1
	• Upgrade to: 2.1.4, completed
	• Attempting to upgrade from: 2.1.4
	• Installed CMFPlacefulWorkflow.
	• Upgrade to: 2.5-alpha1, completed
	• Attempting to upgrade from: 2.5-alpha1
	• Upgrade aborted
	• Error type: Products.ATContentTypes.migration.walker.MigrationError
	• Error value: MigrationError for obj at /msewww/cmfmember_tmp/ 
portal_memberdata/admin (staff -> staff): Traceback (most recent call  
last): File "/Applications/Plone-2.5.5/Instance/Products/ 
ATContentTypes/migration/walker.py", line 174, in migrate  
migrator.migrate() File "/Applications/Plone-2.5.5/Instance/Products/ 
remember/cmfmember/migrator.py", line 85, in migrate return  
InplaceATItemMigrator.migrate(self, *args, **kw) File "/Applications/ 
Plone-2.5.5/Instance/Products/contentmigration/basemigrator/ 
migrator.py", line 191, in migrate self.createNew() File "/ 
Applications/Plone-2.5.5/Instance/Products/contentmigration/ 
translocate.py", line 29, in createNew self.new_id, **schema) File "/ 
Applications/Plone-2.5.5/Instance/Products/contentmigration/ 
common.py", line 74, in _createObjectByType m(id, *args, **kw) File "/ 
Applications/Plone-2.5.5/Instance/Products/msewww/people/staff.py",  
line 49, in addstaff self._setObject(id, o) File "/Applications/ 
Plone-2.5.5/lib/python/Products/BTreeFolder2/BTreeFolder2.py", line  
446, in _setObject notify(ObjectAddedEvent(ob, self, id)) File "/ 
Applications/Plone-2.5.5/lib/python/zope/event/__init__.py", line 23,  
in notify subscriber(event) File "/Applications/Plone-2.5.5/lib/python/ 
zope/app/event/dispatching.py", line 66, in dispatch for ignored in  
subscribers(event, None): File "/Applications/Plone-2.5.5/lib/python/ 
zope/component/__init__.py", line 181, in subscribers return  
sitemanager.subscribers(objects, interface) File "/Applications/ 
Plone-2.5.5/lib/python/zope/component/site.py", line 89, in  
subscribers return self.adapters.subscribers(required, provided) File  
"/Applications/Plone-2.5.5/lib/python/zope/interface/adapter.py", line  
481, in subscribers subscribers = [subscription(*objects) File "/ 
Applications/Plone-2.5.5/lib/python/zope/app/event/objectevent.py",  
line 192, in objectEventNotify adapters = subscribers((event.object,  
event), None) File "/Applications/Plone-2.5.5/lib/python/zope/ 
component/__init__.py", line 181, in subscribers return  
sitemanager.subscribers(objects, interface) File "/Applications/ 
Plone-2.5.5/lib/python/zope/component/site.py", line 89, in  
subscribers return self.adapters.subscribers(required, provided) File  
"/Applications/Plone-2.5.5/lib/python/zope/interface/adapter.py", line  
481, in subscribers subscribers = [subscription(*objects) File "/ 
Applications/Plone-2.5.5/lib/python/OFS/subscribers.py", line 114, in  
dispatchObjectMovedEvent callManageAfterAdd(ob, event.object,  
event.newParent) File "/Applications/Plone-2.5.5/lib/python/OFS/ 
subscribers.py", line 144, in callManageAfterAdd  
ob.manage_afterAdd(item, container) File "/Applications/Plone-2.5.5/ 
Instance/Products/CMFMember/content/member.py", line 1143, in  
manage_afterAdd self.base_archetype.manage_afterAdd(self, object,  
container) File "/Applications/Plone-2.5.5/Instance/Products/ 
Archetypes/BaseContent.py", line 42, in manage_afterAdd  
CatalogMultiplex.manage_afterAdd(self, item, container) File "/ 
Applications/Plone-2.5.5/Instance/Products/CMFCore/ 
CMFCatalogAware.py", line 202, in manage_afterAdd self.indexObject()  
File "/Applications/Plone-2.5.5/Instance/Products/Archetypes/ 
CatalogMultiplex.py", line 36, in indexObject c.catalog_object(self,  
url) File "/Applications/Plone-2.5.5/Instance/Products/CMFPlone/ 
CatalogTool.py", line 357, in catalog_object update_metadata,  
pghandler=pghandler) File "/Applications/Plone-2.5.5/Instance/Products/ 
CacheSetup/patch.py", line 87, in catalog_object return call(self,  
'catalog_object', obj, uid, idxs, update_metadata) File "/Applications/ 
Plone-2.5.5/Instance/Products/CacheSetup/patch_utils.py", line 6, in  
call return getattr(self, PATTERN % __name__)(*args, **kw) File "/ 
Applications/Plone-2.5.5/lib/python/Products/ZCatalog/ZCatalog.py",  
line 567, in catalog_object update_metadata=update_metadata) File "/ 
Applications/Plone-2.5.5/lib/python/Products/ZCatalog/Catalog.py",  
line 339, in catalogObject index = self.updateMetadata(object, uid)  
File "/Applications/Plone-2.5.5/lib/python/Products/ZCatalog/ 
Catalog.py", line 277, in updateMetadata newDataRecord =  
self.recordify(object) File "/Applications/Plone-2.5.5/lib/python/ 
Products/ZCatalog/Catalog.py", line 417, in recordify if(attr is not  
MV and safe_callable(attr)): attr=attr() File "/Applications/ 
Plone-2.5.5/Instance/Products/CMFMember/content/member.py", line 442,  
in getGroups pref = acl_users.getGroupPrefix() AttributeError:  
getGroupPrefix
	• File "/Applications/Plone-2.5.5/Instance/Products/CMFPlone/ 
MigrationTool.py", line 308, in upgrade newv, msgs = self._upgrade(newv)
	• File "/Applications/Plone-2.5.5/Instance/Products/CMFPlone/ 
MigrationTool.py", line 416, in _upgrade res = function(self.aq_parent)
	• File "/Applications/Plone-2.5.5/Instance/Products/CMFPlone/ 
migrations/v2_5/alphas.py", line 24, in alpha1_alpha2  
installPlonePAS(portal, out)
	• File "/Applications/Plone-2.5.5/Instance/Products/remember/ 
cmfmember/monkey.py", line 61, in installPlonePAS result =  
InstallPlonePAS.install(portal)
	• File "/Applications/Plone-2.5.5/Instance/Products/PlonePAS/ 
Extensions/Install.py", line 845, in install restoreUserData(portal,  
out, userdata)
	• File "/Applications/Plone-2.5.5/Instance/Products/remember/ 
cmfmember/monkey.py", line 179, in restoreUserData  
migrateCMFMembers(portal, out)
	• File "/Applications/Plone-2.5.5/Instance/Products/remember/ 
cmfmember/migrator.py", line 161, in migrateCMFMembers  
migrator(portal, out)
	• File "/Applications/Plone-2.5.5/Instance/Products/remember/ 
cmfmember/migrator.py", line 149, in migrateCMFMemberType  
use_catalog_patch=False)
	• File "/Applications/Plone-2.5.5/Instance/Products/ATContentTypes/ 
migration/common.py", line 224, in migratePortalType walk.go()
	• File "/Applications/Plone-2.5.5/Instance/Products/ATContentTypes/ 
migration/walker.py", line 126, in go self.migrate(self.walk(),  
**kwargs)
	• File "/Applications/Plone-2.5.5/Instance/Products/ATContentTypes/ 
migration/walker.py", line 205, in migrate raise  
MigrationError(objpath, migrator, tb)
	• End of upgrade path, migration has finished
	• The upgrade path did NOT reach current version
	• Migration has failed
	• Dry run selected, transaction aborted



On Mar 4, 2008, at 9:27 PM, Rob Miller wrote:

> Kevin Worth wrote:
>> Hi-
>> I'm trying to move up from a CMFMember based site to a remember  
>> site.  I'm having issues with the migration.  I have a feeling it  
>> is either in my MIGRATION_MAP for my custom member types or the way  
>> I am handling the new remember-based members.
>> I regenerated my member types (faculty and staff) using ArchGenXML  
>> 1.5.2 by changing the stereotype for member to remember.  I then  
>> replaced the existing faculty.py and staff.py with the newly  
>> generated files.  Should the original faculty.py and staff.py be  
>> somewhere?
>
> yes, i'd recommend creating your new, remember-based classes in a  
> different module, alongside the original CMFMember-based classes.   
> things can get a bit confusing when you change the class out from  
> under existing objects in the ZODB.  you should still have the  
> CMFMember product present in your Products directory, as well.
>
> once the migration is successful, remember provides a  
> 'remove_cmfmember' external method you can use.  this will clear out  
> the CMFMember remnants that are left in your site.  once this is  
> complete, then you can safely remove the CMFMember code from your  
> Products directory, as well as the CMFMember-based classes that are  
> now obsolete.
>
> -r
>
>
> --
> Archive: http://www.openplans.org/projects/remember/lists/remember/archive/2008/03/1204684075850
> To unsubscribe send an email with subject unsubscribe to remember@... 
> .  Please contact remember-manager@... for questions.
>
>
>


---------------------------------------------------
Kevin Worth <kworth@...>
Senior IT Administrator
Department of Materials Science and Engineering
University of Michigan


Return to date view: threaded or flat