I am running into a problem running collective transmogrifier on Plone 5.0.10. I have been using this version since it was able to run Archetypes addons. When I attempted to migrate from Archetypes to Dexterity, this error came up:
Traceback (innermost last):
Module ZPublisher.Publish, line 138, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 48, in call_object
Module Products.GenericSetup.tool, line 579, in manage_importAllSteps
Module Products.GenericSetup.tool, line 388, in runAllImportStepsFromProfile
-
traceback_info: profile-facultycv.migration.import:import_content
Module Products.GenericSetup.tool, line 1469, in _runImportStepsFromContext
Module Products.GenericSetup.tool, line 1281, in _doRunImportStep -
traceback_info: transmogrifier
Module collective.transmogrifier.genericsetup, line 31, in importTransmogrifier
Module collective.transmogrifier.transmogrifier, line 65, in call
Module collective.transmogrifier.sections.manipulator, line 29, in iter
Module collective.transmogrifier.sections.inserter, line 23, in iter
Module collective.transmogrifier.sections.inserter, line 23, in iter
Module collective.transmogrifier.sections.inserter, line 23, in iter
Module collective.jsonmigrator.blueprints.partialcommit, line 22, in iter
Module collective.jsonmigrator.blueprints.workflowhistory, line 53, in iter
Module transmogrify.dexterity.schemaupdater, line 138, in iter
Module transmogrify.dexterity.serializer, line 67, in iter
Module collective.transmogrifier.sections.manipulator, line 29, in iter
Module collective.transmogrifier.sections.constructor, line 65, in iter
Module Products.CMFCore.TypesTool, line 569, in _constructInstance
Module Products.BTreeFolder2.BTreeFolder2, line 461, in _setObject
Module zope.event, line 31, in notify
Module zope.component.event, line 24, in dispatch
Module zope.component._api, line 136, in subscribers
Module zope.component.registry, line 321, in subscribers
Module zope.interface.adapter, line 585, in subscribers
Module zope.component.event, line 32, in objectEventNotify
Module zope.component._api, line 136, in subscribers
Module zope.component.registry, line 321, in subscribers
Module zope.interface.adapter, line 585, in subscribers
Module Products.CMFCore.CMFCatalogAware, line 262, in handleContentishEvent
Module Products.CMFCore.CMFCatalogAware, line 188, in notifyWorkflowCreated
Module Products.CMFCore.WorkflowTool, line 289, in notifyCreated
Module Products.CMFCore.WorkflowTool, line 635, in _reindexWorkflowVariables
Module Products.CMFCore.CMFCatalogAware, line 88, in reindexObject
Module Products.CMFCore.CatalogTool, line 301, in reindexObject
Module Products.CMFPlone.CatalogTool, line 351, in catalog_object
Module Products.ZCatalog.ZCatalog, line 476, in catalog_object
Module Products.ZCatalog.Catalog, line 341, in catalogObject
Module Products.ZCatalog.Catalog, line 292, in updateMetadata
Module Products.ZCatalog.Catalog, line 415, in recordify
Module yc.facultycv.content.faculty, line 883, in Description
Module yc.facultycv.content.faculty, line 886, in computeDescription
Module , line 2, in get
Module plone.api.validation, line 114, in wrapped
Module , line 2, in get
Module plone.api.validation, line 148, in wrapped
MissingParameterError: At least one of these parameters must be supplied: userid, username.
Is there a way to get the userid to transfer over from the archetypes to dexterity content type? I was able to get it working by using the following python code for example in the implementer, however the title fields and other member fields were displaying as blank in the views:
def computeTitle(self):
user = api.user.get_current()
first_name = user.getProperty('first_name') or ' '
last_name = user.getProperty('last_name') or ' '
space = ', '
return "%s%s%s" % (last_name, space, first_name)
I am currently trying to use the following in my code:
def computeTitle(self):
user = api.user.get(username=self.userid)
first_name = user.getProperty('first_name') or ' '
last_name = user.getProperty('last_name') or ' '
space = ', '
return "%s%s%s" % (last_name, space, first_name)
What needs to change?
I thank you kindly for your help.