Closed rnixx closed 9 years ago
What if I want to replace a core behavior, so that every time code looks it up by name it gets my replacement behavior instead of the core one? Doesn't look like that is possible with this implementation.
@do3cc +1 for the fallback
@davisagli at the moment you have to register a new behavior too - which gets a new name by __identifier__
- so nothing changes or do i oversee something? Do you request a new feature?
First I rebased master and now I took care to always register the __identifier__
and if given the name. That way nothing breaks.
Todo: add this to the examples in README.rst
.
Lets get jenkins opinion about this http://jenkins.plone.org/view/All/job/pull-request/136/
State here: full documentation in README.rst
missing (down in ZCML and examples section.
Documentation for name was added to README.rst. tests are running here: http://jenkins.plone.org/job/pull-request/162/
http://jenkins.plone.org/view/All/job/pull-request-4.3/24/
tests ok
When I start my plone-coredev 4.3 buildout, I now get these warnings:
2015-07-29 23:09:55 WARNING plone.behavior Specifying 'for' in behavior 'Name from title' if no 'factory' is given has no effect and is superfluous.
2015-07-29 23:09:55 WARNING plone.behavior Specifying 'for' in behavior 'Name from file name' if no 'factory' is given has no effect and is superfluous.
2015-07-29 23:09:55 WARNING plone.behavior Specifying 'for' in behavior 'Navigation root' if no 'factory' is given has no effect and is superfluous.
2015-07-29 23:09:55 WARNING plone.behavior Specifying 'for' in behavior 'Exclude From navigation' if no 'factory' is given has no effect and is superfluous.
2015-07-29 23:09:55 WARNING plone.behavior Specifying 'for' in behavior 'Next previous navigation toggle' if no 'factory' is given has no effect and is superfluous.
2015-07-29 23:09:55 WARNING plone.behavior Specifying 'for' in behavior 'Allow discussion' if no 'factory' is given has no effect and is superfluous.
2015-07-29 23:09:55 WARNING plone.behavior Specifying 'for' in behavior 'Next previous navigation' if no 'factory' is given has no effect and is superfluous.
Two things:
+1 to fix them, its a wrong registration (predicting to bind for something that has no effect), the change just shows it, nothing new.
PR at plone/plone.app.dexterity/pull/174
According to http://comments.gmane.org/gmane.comp.web.zope.plone.devel/34834 this pull request introduces behavior short names which are set at ZCML registration time and should later be used for behavior lookup on dexterity content and for behavior introspection.
This change is 100% B/C and only logs a warning at instance startup if a behavior registration has no name set.
More to come in downstream packages
cheers