Plone 5 Dexterity content type and

Does anyone know if the Check-in and Check-out functions from work with Dexterity custom content types in Plone 5? Is there a behavior I need to declare in my content types to enable to work with them? Any advice would be most appreciated.

Plone 5.0.7 (5017)
CMF 2.2.10
Zope 2.13.26
Python 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]
PIL 3.4.2 (Pillow)

Content-types ( 1.2.22
Dexterity versioning support 1.3
Working Copy Support (Iterate) 3.2.4

I think versioning has to be enabled.

Check the conditions in

pbauer, thank you for your help. I have already enabled versioning but I am not sure what I should do with I inserted this as a behavior and it did not work. Where do I go to check the conditions for Please advise. Thanks.

That is a python-path to the method that does the check if checkout is allowed. I would add a pdb there an see where it fails.

Oh, maybe you forgot to set a versioning-policy for the new type in @@content-controlpanel. Versioning is only really on if you did that. In your package that would means adding a repository_tool.xml with:

<?xml version="1.0"?>
  <type name="yourtype">
   <policy name="at_edit_autoversion"/>
   <policy name="version_on_revert"/>

Thanks pbauer. I added repositorytool.xml to my package and I can see the Check Out option under Action. However, when I try to check out, the following errors are now showing 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, line 78, in __call__ Module, line 71, in checkout 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, line 39, in handleCheckout Module, line 37, in lockContext TypeError: ('Could not adapt', <Item at /EconomicBenefits/forms/administrative-letter-test>, <InterfaceClass plone.locking.interfaces.ILockable>)

Am I missing something?


Nevermind. I figured it out. I needed to add another behavior to the content type:
<element value=""/>

Once I added this in, everything worked perfectly. Thank you so much for all your help. Cheers.

1 Like

This sounds worthy of being added to the (Dexterity?) documentation.

You can just write it in short:

<element value="plone.locking"/>

Thanks so much, Kim. Anything that will help the Plone Community is always good! Cheers.

Jens, thank you so much. I did not know that there was an alternative to the statement I had. The long declaration came from Dexterity itself. Is there a way for me to find out if there are shorter statements to the element values that Dexterity provides? The following is what I am using in my current content type:
<element value="" /> <element value=""/> <element value="collective.dexteritytextindexer.behavior.IDexterityTextIndexer"/> <element value=""/> <element value=""/> <element value=""/> <element value=""/> <element value=""/>

Thanks so much. Cheers.

@angelawong it is documented here at the Plone Documentation, Chapter Standard Behaviors

@jensens Thanks so much. It's much appreciated. Cheers.