Skip to content

Commit 71803e9

Browse files
Fix HCaptchaFieldWidget location to work in all plone.formwidget.hcaptcha versions.
In plone/plone.formwidget.hcaptcha#25 ``widget.py`` was moved to ``browser/widget.py``. It seems we can always get the ``HCaptchaFieldWidget`` class from the `__init__.py`` file though. Sample [test failure on GitHub Actions](https://github.com/collective/collective.easyform/actions/runs/28085338020/job/83149843124#step:5:379): ``` File ".../src/collective/easyform/browser/widgets.zcml", line 136.4-141.10 zope.configuration.interfaces.InvalidToken: ImportError: Couldn't import plone.formwidget.hcaptcha.widget, No module named 'plone.formwidget.hcaptcha.widget' in 'plone.formwidget.hcaptcha.widget.HCaptchaFieldWidget' ```
1 parent 1016dc7 commit 71803e9

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

news/+7a14b16f.bugfix.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix ``HCaptchaFieldWidget`` location to work in all ``plone.formwidget.hcaptcha`` versions.
2+
[maurits]

src/collective/easyform/browser/widgets.zcml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
</configure>
135135
<configure zcml:condition="installed plone.formwidget.hcaptcha">
136136
<adapter
137-
factory="plone.formwidget.hcaptcha.widget.HCaptchaFieldWidget"
137+
factory="plone.formwidget.hcaptcha.HCaptchaFieldWidget"
138138
provides="z3c.form.interfaces.IFieldWidget"
139139
for="collective.easyform.interfaces.IHCaptcha
140140
*"

0 commit comments

Comments
 (0)