Ticket #12751 (confirmed Bug)
[plone.app.discussion] cannot have recaptcha enabled and comment form extended at the same time
Reported by: | erral | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 4.x |
Component: | Commenting/Discussion | Version: | 4.1 |
Keywords: | Cc: | vangheem |
Description
I have followed the documentation at http://packages.python.org/plone.app.discussion/howtos/howto_extend_the_comment_form.html to add two fields to my comment form and then I have enabled recaptcha con my site but it doesn't appear in the form.
I have removed the conditional statement on captcha.zcml to check what's going on, and found a ZCML error about a double registration of adapters:
zope.configuration.config.ConfigurationConflictError: Conflicting configuration actions For: ('adapter', (<InterfaceClass zope.interface.Interface>, <InterfaceClass zope.publisher.interfaces.browser.IDefaultBrowserLayer>, <class 'plone.app.discussion.browser.comments.CommentForm'>), <InterfaceClass plone.z3cform.fieldsets.interfaces.IFormExtender>, '') File "/var/csmant/instances/7777_codesyntax/src/codesyntax.theme/codesyntax/theme/browser/configure.zcml", line 181.4-185.10 <adapter factory=".comment.CommentExtender" provides="plone.z3cform.fieldsets.interfaces.IFormExtender" /> File "/var/csmant/downloads/eggs/plone.app.discussion-2.1.4-py2.6.egg/plone/app/discussion/browser/captcha.zcml", line 18.8-20.74 <adapter factory=".captcha.CaptchaExtender" provides="plone.z3cform.fieldsets.interfaces.IFormExtender" />
This can be easily solved adding a "name" to one of the adapters (I have done so with my adapter and it works), so I think it is worth to add a name to the captcha adapter, and also to the documentation of how to extend the form.
Change History
Note: See
TracTickets for help on using
tickets.