Error when trying to Save own dexterity Type in Plone 5

I have created a dexerity type with mr. Bob and installed it into a new plone enviroment.
There are just the basic fields avaiable like created from the template.
After filling out and Saving this new Type an error occurs.

Traceback (innermost last):
Module ZPublisher.WSGIPublisher, line 162, in transaction_pubevents
Module ZPublisher.WSGIPublisher, line 371, in publish_module
Module ZPublisher.WSGIPublisher, line 266, in publish
Module ZPublisher.mapply, line 85, in mapply
Module ZPublisher.WSGIPublisher, line 63, in call_object
Module plone.z3cform.layout, line 63, in call
Module plone.z3cform.layout, line 47, in update
Module plone.dexterity.browser.add, line 138, in update
Module plone.z3cform.fieldsets.extensible, line 65, in update
Module plone.z3cform.patch, line 30, in GroupForm_update
Module z3c.form.group, line 145, in update
Module plone.app.z3cform.csrf, line 22, in execute
Module z3c.form.action, line 98, in execute
Module z3c.form.button, line 315, in call
Module z3c.form.button, line 170, in call
Module plone.dexterity.browser.add, line 116, in handleAdd
Module z3c.form.form, line 265, in createAndAdd
Module plone.dexterity.browser.add, line 91, in add
Module plone.dexterity.utils, line 178, in addContentToContainer
Module Products.BTreeFolder2.BTreeFolder2, line 465, in _setObject
Module zope.event, line 32, in notify
Module zope.component.event, line 27, in dispatch
Module zope.component._api, line 134, in subscribers
Module zope.interface.registry, line 448, in subscribers
Module zope.interface.adapter, line 899, in subscribers
Module zope.component.event, line 36, in objectEventNotify
Module zope.component._api, line 134, in subscribers
Module zope.interface.registry, line 448, in subscribers
Module zope.interface.adapter, line 899, in subscribers
Module Products.CMFCore.CMFCatalogAware, line 274, in handleContentishEvent
Module Products.CMFCore.CMFCatalogAware, line 197, in notifyWorkflowCreated
Module Products.CMFCore.WorkflowTool, line 299, in notifyCreated
Module Products.DCWorkflow.DCWorkflow, line 334, in notifyCreated
Module Products.DCWorkflow.DCWorkflow, line 418, in _changeStateOf
Module Products.DCWorkflow.DCWorkflow, line 445, in _executeTransition
AttributeError: 'NoneType' object has no attribute 'getId'

What is going wrong ?

Hi Thomas !

What Plone- and mr.bob versions are you using? What additional packages are installed in your Plone-environment ?

Adding and saving a simple dexterity-based content-type should be well covered by one of the testsuites delivered from the dexterity-related packages and should just work.

What do you mean exactly with "new plone environment" ? Is it just a new pone instance inside a zope installation where other packages are available or does the error happen in a freshly installed Zope/Plone environment without any additonally packages ?

Best regards.

Hello Torsten,

this are ther versions i am using.
Plone 5.2
'/opt/plone5.2/buildout-cache/eggs/cp38/mr.bob-0.1.2-py3.8.egg',
'/opt/plone5.2/buildout-cache/eggs/cp38/bobtemplates.plone-5.2.1-py3.8.egg',

With new plone enviroment i mean i created a new website.

Meanwhile i found out the dexterity type is working when installed without any additional packages. It seems i have to look inside my additiona packages for the problem.

Thomas via Plone Community wrote at 2023-11-19 07:12 +0000:

I have created a dexerity type with mr. Bob and installed it into a new plone enviroment.
There are just the basic fields avaiable like created from the template.
After filling out and Saving this new Type an error occurs.

Traceback (innermost last):
...
Module Products.DCWorkflow.DCWorkflow, line 445, in _executeTransition
AttributeError: 'NoneType' object has no attribute 'getId'

What is going wrong ?

The code at this place is

        old_sdef = self._getWorkflowStateOf(ob)
        old_state = old_sdef.getId()

This means that self._getWorkflowStateOf(ob) has returned None.

You do not provide enough information that we can determine why this happens.
At your place, I would use debugging to find this out.
I use Products.PDBDebugMode to help in such debugging tasks.
If you Plone runs in debug/foreground mode, Products.PDBDebugMode
enters the Python debugger when exceptions occur and allows you
to analyse the exception context.