As Dieter wrote: check for the related interface. In doubt add a debugger breakpoint inside the configured factory method and check if there is something potentially going wrong.
@dieter@zopyx Thank you for your replies. Before posting, I have not tested saving the content type. I was expecting the default True value to already apply in the add form.
I have just tested saving the form and the content type still has the default False value.
p.a.dexterity registers the behavior with the following:
<plone:behavior
name="plone.excludefromnavigation"
title="Exclude From navigation"
description="Allow items to be excluded from navigation"
provides=".exclfromnav.IExcludeFromNavigation"
/>
<adapter
for="*"
factory=".exclfromnav.default_exclude_false"
/>
Is my adapter registration to override the above for the personal profile type, correct?
Thanks for the confirmation. I have difficulty finding documentation about this.
The registration zcml, at least, is being executed since I get errors when I try to use other options like a layer. The interface is a schema interface. I will check on this when I find more time. I actually have a custom behavior that already implements Exclude from Navigation with a default True value. I was just interested in finding out how to adapt the default implementation since the code is already there.
I will post back if I have more to add on this topic.