Does anyone know if the Check-in and Check-out functions from plone.app.iterate work with Dexterity custom content types in Plone 5? Is there a behavior I need to declare in my content types to enable plone.app.iterate to work with them? Any advice would be most appreciated.
pbauer, thank you for your help. I have already enabled versioning but I am not sure what I should do with plone.app.iterate.browser.control.Control.checkout_allowed. I inserted this as a behavior and it did not work. Where do I go to check the conditions for plone.app.iterate.browser.control.Control.checkout_allowed? Please advise. Thanks.
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:
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 plone.app.iterate.browser.checkout, line 78, in __call__ Module plone.app.iterate.policy, 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 plone.app.iterate.subscribers.locking, line 39, in handleCheckout Module plone.app.iterate.lock, line 37, in lockContext TypeError: ('Could not adapt', <Item at /EconomicBenefits/forms/administrative-letter-test>, <InterfaceClass plone.locking.interfaces.ILockable>)
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="plone.app.content.interfaces.INameFromTitle" /> <element value="plone.app.dexterity.behaviors.metadata.IDublinCore"/> <element value="collective.dexteritytextindexer.behavior.IDexterityTextIndexer"/> <element value="plone.app.relationfield.behavior.IRelatedItems"/> <element value="plone.app.dexterity.behaviors.exclfromnav.IExcludeFromNavigation"/> <element value="plone.app.contenttypes.behaviors.tableofcontents.ITableOfContents"/> <element value="plone.app.versioningbehavior.behaviors.IVersionable"/> <element value="plone.app.lockingbehavior.behaviors.ILocking"/>